1

In order to comply with certain US regulations - we need the ability to send a confirmation to the user once their password has been changed. Right now, Joomla will send an email link asking the user to click the link in order to change their password - but there does not seem to be an option to send an email to the user AFTER the user completes the password change.

This message will state something like: "Your password has successfully been changed. If you did not request this change - please login to your account or contact support".

I have looked at component\com_users\controllers\reset.php This seems to be there area where a triggered email could go out to the user (around line 182):

    // Complete succeeded.
    // Proceed to the login form.
    $message = JText::_('COM_USERS_RESET_COMPLETE_SUCCESS');
    $this->setRedirect(JRoute::_('index.php?option=com_users&view=login', false), $message);

Any ideas on the best way to implement this?

2
  • ...but if the password was successfully changed and they didn't do it, then how could they possibly login? Commented Mar 30, 2021 at 9:52
  • I get it - but I still need to send a confirmation of sorts to notify them that it was changed - and notify the admin if they did not do this. Commented Mar 30, 2021 at 14:17

1 Answer 1

1

You can develop a custom plugin binded to user events to trigger your custom code when the user is modified.

Here you can find a guide to create the plugin and the event to use:

Creating a Plugin for Joomla

User event: onUserBeforeSave

With this solution your code will be safe in future updates avoiding direct edits on Joomla code. There are also a lot of events you can use to trigger code from a plugin.

1
  • Thanks for sharing Kitase88 - I will have to look into this...was hoping for an easier solution, if possible. Commented Apr 1, 2021 at 22:08

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.