3

I am trying to override /components/com_users/models/reset.php

I have tried numerous pathways to, but cannot get the site to look at it.

Have tried:

/templates/TEMPLATE_NAME/html/com_users/reset.php

/templates/TEMPLATE_NAME/html/com_users/reset/reset.php

/templates/TEMPLATE_NAME/html/com_users/models/reset.php

/templates/TEMPLATE_NAME/html/com_users/models/reset/reset.php

During testing, when I edit core file: /components/com_users/models/reset.php

it works as expected, but oviously, I do not want to edit core files and need to override reset.php

Any ideas ?

Thanks

FYI: The changes I have made to reset.php is to simplify the password reset procedure for my users. I have included the Username in the email users get when they request a password reset. I understand that some think this may be a security issue, however I do not. Username is retrievable anyway if you have thee mail address, so why not include it in the email to assist users. The fact is that most users who forget their password ALSO forget their username, and currently the process of retrieving both is too hard for average Joe user. IF anyone is interested in how I did it, Id be happy to post about it. But I first need to get this override working.

1 Answer 1

1

You are almost there. You should copy it to:

TEMPLATE_NAME/code/com_users/models/reset.php

You shouldn't copy it to the html folder (notice that code is there instead of html).

Check this official guide about this: https://docs.joomla.org/How_to_override_the_component_mvc_from_the_Joomla!_core

1
  • 1
    Ok, that works. I did have to install the MVC plugin joomla-override.to make it work. Thank You
    – GregH
    Commented Oct 10, 2016 at 0:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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