Does anybody know how to remove the username field from the reset password confirmation form?

I edited the reset_confirm.xml file in /components/com_users/models/forms to remove it from the front end, but now when I try it I get the error:

Your password reset confirmation failed because the verification code was invalid. User not found.

I am new to Joomla and php. Can anyone help?

  • Can you elaborate more about what you are trying to achieve and why. Looking at your edit of the field .xml files you tried to hide/remove the username field, However if you remove the username field how is Joomla going to know which Username is to be reset, hence the 'User not found' part of your message. – Irata Jun 6 '19 at 8:10

You can follow the instructions shown here, https://www.joomlashack.com/blog/joomla/remove-links-from-login/ that shows you how to remove it from the Login form displays, which is not exactly the page you want to hide it on however it does show you the technique. This other link tells you a bit more about your specific requirement, https://forum.joomla.org/viewtopic.php?t=962895

There are numerous other examples for how to do this if you search for 'joomla hide password reset from login page' in your favourite search engine, that is all I did.

Essentially you are creating an override of the Login page through the template system to disable the links from being displayed in way that wont be affected by upgrades to Joomla.

The approach you have taken in editing the code supplied by Joomla would mean that even if it did work for you then it would get replaced the next time Joomla updates com_user. Joomla has a good collection of ways to override many things and it is something you should learn more about if you want to understand Joomla better.

  • The question makes no sense because there is no 'forgot my username' field on the reset password form. Not on mine anyway, just has 1 field for email. – Mythic Jun 6 '19 at 1:30
  • @Mythic I agree, I couldn't find it on any of my 3.9.x sites and even checked with protstar and looked through the forms displayed and can't find anything that matches the first line of the question, hence why my answer was being very generic in response taking a guess at what the OP is trying to do. – Irata Jun 6 '19 at 8:01
  • OP is referring to username field in password reset confirmation form. – Sharky Jun 6 '19 at 8:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.