PDA

View Full Version : New User Welcome Email base on profile field


Bobbo
10-24-2005, 06:16 PM
Hi,

I'm trying to figure out how to change the welcome email message that a new user receives based on a field they filled out on the registration page.

I've added a new email body text phrase: welcomemail2 which contains the customized message.

In register.php I think I've found the location for the conditional.


// activate account
$username = unhtmlspecialchars($userinfo['username']);
if ($vbulletin->options['welcomemail'] AND !$userinfo['posts'])
{

if ($vbulletin->userinfo['field5']=="1024"){ // My mod
eval(fetch_email_phrases('welcomemail2')); // My mod
vbmail($userinfo['email'], $subject, $message); // My mod

} else { //My mod

eval(fetch_email_phrases('welcomemail'));
vbmail($userinfo['email'], $subject, $message);}
}


I know this code doesnt work... Any direction or thoughts?

Thanks!

:-) Some PHP God out there has to have some insight on this one, no?