Re: [gkornbluth] set membership signup to default to "disabled"
Jason,
I gave it a try and made a few modifications (guesses) regarding the double quotes at the befginning and end of the "text" section and the escapes for the double quotes in the href. (Got errors without them)
here's the code that I'm using:
// send email
$wasChecked = intval(!$oldRecord[$fieldname] && $_REQUEST[$fieldname]);
$wasUnchecked = intval($oldRecord[$fieldname] && !$_REQUEST[$fieldname]);
if ($wasChecked) {
$errors = sendMessage(array(
'from' => $SETTINGS['adminEmail'],
'to' => $_REQUEST['email'],
'subject' => "Your membership has been approved!",
'text' => "<<< __TEXT__
Congratulations!
You're Artists of Palm Beach County membership has been approved and you now have access to the \"Members Only\" area of our web site. \n
Your user name is: {$_REQUEST['username']} \n
and your temporary password is: {$_REQUEST['password']}.\n \n
Once you have successfully logged in, you can change your password and update your profile information. \n \n
<a href=\”http://www.artistsofpalmbeachcounty.org{$GLOBALS['WEBSITE_LOGIN_LOGIN_FORM_URL']}\">Click here to login</a>
Best, \n
The Membership Committee
__TEXT__
",
));
if ($errors) { die($errors); }
}
}
?>
And here's the result that I get in the e-mail:
<<< __TEXT__
Congratulations!
You're Artists of Palm Beach County membership has been approved and you now have access to the "Members Only" area of our web site.
Your user name is: fish
and your temporary password is: a2b95721c561bb5ed.
Once you have successfully logged in, you can change your password and update your profile information.
<a href=\ http://www.artistsofpalmbeachcounty.org/sample_login.php">Click here to login</a>
Best,
The Membership Committee
__TEXT__
I'm probably very close but don't what else to do.
Thanks,
Jerry Kornbluth
The first CMS Builder reference book is now available on-line!
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php