PDA

View Full Version : Show Account Type in account_created_admin email template



QuickRon
September 3, 2019, 03:31 PM
Can you update the email template account_created_admin, which notifies the admin of a new account, to show the Account Type as well? I've had to do this with every Flynax site and it would be nice if it's part of the core software.

This allows us to easily/quickly see the account type of a new registration.

You may also want to consider adding it to all "new account" emails, even the ones that goes to the new account user.

Thank you
Ron

Rudi
September 4, 2019, 06:12 AM
Hello Ron,

Go to ftp > includes > classes > rlAccount.class.php > public function sendRegistrationNotification > // prepare admin notification e-mail

find:


$find = array('{first_name}', '{last_name}', '{username}', '{join_date}', '{status}', '{details_link}', '{plan_info}');
$replace = array(
empty($account['First_name']) ? 'Not specified' : $account['First_name'],
empty($account['Last_name']) ? 'Not specified' : $account['Last_name'],
$account['Username'],
date(str_replace(array('b', '%'), array('M', ''), RL_DATE_FORMAT)),
$lang[$account['Status']],
$details_link,
$plan_details,
);


and change to:


$find = array('{first_name}', '{last_name}', '{username}', '{join_date}', '{status}', '{details_link}', '{plan_info}', '{account_type}');
$replace = array(
empty($account['First_name']) ? 'Not specified' : $account['First_name'],
empty($account['Last_name']) ? 'Not specified' : $account['Last_name'],
$account['Username'],
date(str_replace(array('b', '%'), array('M', ''), RL_DATE_FORMAT)),
$lang[$account['Status']],
$details_link,
$plan_details,
$account_type['name']
);


then go to the template and add a placeholder {account_type} to the text