How can the username be sent to a user in the Joomla PASSWORD_RESET_CONFIRMATION_EMAIL_TEXT?
The Joomla "forgot your password" process sends an email containing a token to the user. They can then use the url in the email to go to the "Confirm your account" page. But here they need to enter their username as well as the token. If the user has forgotten their password, they are unlikely to remember their username. So I'd like to display the username in the email to make it easy for users to reset their forgotten password.
The site uses Joomla 1.5.23.
Thanks.
Edited to add more info: I've seen this item about the same issue: Email Message configuration for forgot password
But that adds $fromname
into the email; and that's the site name as shown in sent emails. It is not the username. So I don't believe that's the solution.
So I think I need a similar edit in components/com_user/models/reset.php to include the username in the email message in this line (about line 256):
$body = JText::sprintf('PASSWORD_RESET_CONFIRMATION_EMAIL_TEXT', $sitename, $token, $url);
Just adding $username
(which is referred to earlier in the file) displays nothing.
And then I would amend the language to refer to the username variable in the following file:
language/en-GB/en-GB.com_user.ini