PDA

View Full Version : Please help - Stuck on Conditional for custom profile field5


Bobbo
10-25-2005, 11:27 AM
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 additional email phrases which contain different welcome messages.

I know I need a conditional in register.php kind of like the one below, which doesnt work. Do I need to pull the ['field5'] from an array into a variable in order to do the conditional, or should it work with $vbulletin->userinfo['field5'] or $userinfo[field5], or something similar?



// Modification Conditional for Welcomemail options

if ($userinfo['field5']==1024)
{
eval(fetch_email_phrases('welcomemail2'));
} else {

eval(fetch_email_phrases('welcomemail'));
}
vbmail($email, $subject, $message);
// End Modification


I've tried it many ways. Both eval fetches work, however the conditional variable syntax that compares my custom field5 field isn't right.

Please help.