I am using joomla's default login module. In forgot module section, I have added one more column called username. Now how shall I send this username along with the token id in the mail? Please help me.
Thanks in advance.
I am using joomla's default login module. In forgot module section, I have added one more column called username. Now how shall I send this username along with the token id in the mail? Please help me.
Thanks in advance.
Open the following folder:
root/components/com_user/models/reset.php
Joomla 2.5
Lines 383 to 388, change this:
$body = JText::sprintf(
'COM_USERS_EMAIL_PASSWORD_RESET_BODY',
$data['sitename'],
$data['token'],
$data['link_text']
);
to this:
$body = JText::sprintf(
'COM_USERS_EMAIL_PASSWORD_RESET_BODY',
$data['fromname'], //added data type to get the username
$data['sitename'],
$data['token'],
$data['link_text']
);
Joomla 1.5
On line 256, change this:
$body = JText::sprintf('PASSWORD_RESET_CONFIRMATION_EMAIL_TEXT', $sitename, $token, $url);
to this:
$body = JText::sprintf('PASSWORD_RESET_CONFIRMATION_EMAIL_TEXT', $sitename, $fromname, $token, $url);
This is incorrect;
$data['fromname'], //added data type to get the username
This should read ;
$data['**username**'], //added data type to get the username
Also dont forget you will also need to modify the language string for this email to include and extra %s.
So in you email it will now read;
%$ = username
%$ = sitename
%$ = verification code
%$ = site link