PDA

View Full Version : Email Template {username}



Kemoid Wilson
December 4, 2013, 12:47 AM
Why is the username veriable different in each email template? For example if I am the admin in one template the username is Admin and in another the username is Administrator.

Mike
December 5, 2013, 07:30 AM
It's probably because email templates for different areas, one is for admin panel account another is for front-end account with name Administrator

When you install software it automatically creates same account to Front End and admin panel, but they are different. For example you can delete front end account if don't need it without any worries.

Kemoid Wilson
December 7, 2013, 01:48 PM
Thanks for the reply.

The problem I am having is that the wrong username is being sent when I insert it in the remind password email template.

Mike
December 10, 2013, 11:57 AM
I have looked into it and i see that in remind function it's replacing with Full_name for some reason

please try to change code ~47 line


$mail_tpl['body'] = str_replace( array( '{login}', '{password}', '{username}' ), array( $profile_info['Username'], $password, $profile_info['Full_name'] ), $mail_tpl['body'] );

to


$mail_tpl['body'] = str_replace( array( '{login}', '{password}', '{username}' ), array( $profile_info['Username'], $password, $profile_info['Username'] ), $mail_tpl['body'] );


Please let me know if it fixed your problem i will investigate it further and probably we will add to the software version

Kemoid Wilson
December 10, 2013, 07:04 PM
I have looked into it and i see that in remind function it's replacing with Full_name for some reason

please try to change code ~47 line


$mail_tpl['body'] = str_replace( array( '{login}', '{password}', '{username}' ), array( $profile_info['Username'], $password, $profile_info['Full_name'] ), $mail_tpl['body'] );

to


$mail_tpl['body'] = str_replace( array( '{login}', '{password}', '{username}' ), array( $profile_info['Username'], $password, $profile_info['Username'] ), $mail_tpl['body'] );


Please let me know if it fixed your problem i will investigate it further and probably we will add to the software version

Thanks for the quick replay as always Mike but you forgot to tell me where to find this file.

Mike
December 12, 2013, 04:43 AM
Sorry, its includes/controllers/remind.inc.php

Kemoid Wilson
December 14, 2013, 06:16 AM
Thanks for your reply but I am still getting the same result.

Mike
December 16, 2013, 06:53 AM
Please send pm me details or submit a ticket in order to investigate this issue if it still not working properly.