Website Membership - Fullname in Sign-up Email

Hello, All -

I'd like to have the users fullname appear in the sign-up notification which is sent out when someone registers. A copy of this email is also sent (Bcc) to the site Admin. Displaying the fullname would be useful - especially for weeding out potential spam registrations.

I've played around with the websiteMembership.php file but cannot seem to find a way of adding fullname to the list of placeholders in the USER-SIGNUP email template.

I've added it here...

$user = mysql_get(accountsTable(), $userNum);
$emailHeaders = emailTemplate_loadFromDB(array(
'template_id' => 'USER-SIGNUP',
'placeholders' => array(
'user.username' => $user['username'],
'user.email' => $user['email'],
'user.fullname' => $user['fullname'],
'user.password' => $passwordText,
'loginUrl' => realUrl($GLOBALS['WEBSITE_LOGIN_LOGIN_FORM_URL']),
)));

And here...

// USER-SIGNUP
emailTemplate_addToDB(array(
'template_id' => "USER-SIGNUP",
'description' => "Website users receive this email when they sign up with their password.",
'placeholders' => array('user.username','user.email','user.fullname','user.password','loginUrl','resetUrl'), // array of placeholder names
'from' => "#settings.adminEmail#",
'to' => "#user.email#",
'subject' => "#server.http_host# Account Details",

But neither addition appears to have any effect on the email template in the CMSB backend.

What did I miss?!

:0/

Perch

By claire - January 5, 2015

Hi Perch

Have you put the placeholder '#user.fullname#' anywhere in the email template? It's got to be there somewhere or the user's name will not be inserted properly.

--------------------

Claire Ryan
interactivetools.com

Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Ah -

I assumed that if I'd added the code correctly (above) #user.fullname# would appear in the list of available placeholders automatically!

:0/

Perch

Yes, it does!

Thanks, Claire.

:0)

Perch