I get the notification email when a new user signs up but stock the only thing that comes in the email is the username and email address. I want to be able to Make the Profile 1 and Profile 2 required fields and have them come in the email. This way I will know at a glance who the request is from.
How can I do this?
Thanks,
Frank
For a start, post a link to your site and a non-admin test user account.
http://www.thepumas.com/login.php
testuser
test
The registration email only containing the username and email address is expected default behaviour, I must have misinterpreted/misread your initial question in the first place, so please accept my apologies for unnecessarily asking you for link and account.
To get the profile fields to show in your email, you'll have to edit register.php, find // email notification to admin
if ($CONFIG['reg_notify_admin_email']) {
// get default language in which to inform the admin
$lang_register_php_def = cpg_get_default_lang_var('lang_register_php');
$lang_register_approve_email_def = cpg_get_default_lang_var('lang_register_approve_email');
if ($CONFIG['admin_activation']==1) {
$act_link = rtrim($CONFIG['site_url'], '/') . '/register.php?activate=' . $act_key;
$template_vars = array(
'{SITE_NAME}' => $CONFIG['gallery_name'],
'{USER_NAME}' => $user_name,
'{ACT_LINK}' => $act_link,
);
cpg_mail('admin', sprintf($lang_register_php_def['notify_admin_request_email_subject'], $CONFIG['gallery_name']), nl2br(strtr($lang_register_approve_email_def, $template_vars)));
} else {
cpg_mail('admin', sprintf($lang_register_php_def['notify_admin_email_subject'], $CONFIG['gallery_name']), sprintf($lang_register_php_def['notify_admin_email_body'], $user_name));
}
}
and replace with // email notification to admin
if ($CONFIG['reg_notify_admin_email']) {
// get default language in which to inform the admin
$lang_register_php_def = cpg_get_default_lang_var('lang_register_php');
$lang_register_approve_email_def = cpg_get_default_lang_var('lang_register_approve_email');
if ($CONFIG['admin_activation']==1) {
$act_link = rtrim($CONFIG['site_url'], '/') . '/register.php?activate=' . $act_key;
$template_vars = array(
'{SITE_NAME}' => $CONFIG['gallery_name'],
'{USER_NAME}' => $user_name,
'{ACT_LINK}' => $act_link,
);
// custom hack: add profile fields - start
$custom_line_break = "\n\r";
$cutom_email_content = $custom_line_break
$profile1.$custom_line_break.
$profile2.$custom_line_break.
$profile3.$custom_line_break.
$profile4.$custom_line_break.
$profile5.$custom_line_break.
$profile6';
// custom hack: add profile fields - end
cpg_mail('admin', sprintf($lang_register_php_def['notify_admin_request_email_subject'], $CONFIG['gallery_name']), nl2br(strtr($lang_register_approve_email_def, $template_vars).$cutom_email_content));
} else {
cpg_mail('admin', sprintf($lang_register_php_def['notify_admin_email_subject'], $CONFIG['gallery_name']), sprintf($lang_register_php_def['notify_admin_email_body'], $user_name));
}
}
(not tested - please report back).
I have done this and get
Parse error: parse error, unexpected T_VARIABLE in /home/thepumas/public_html/register.php on line 322
Should be
// custom hack: add profile fields - start
$custom_line_break = "\n\r";
$cutom_email_content = $custom_line_break.
$profile1.$custom_line_break.
$profile2.$custom_line_break.
$profile3.$custom_line_break.
$profile4.$custom_line_break.
$profile5.$custom_line_break.
$profile6;
// custom hack: add profile fields - end
Where does that part go?
Replaces the part with the typo, here
// custom hack: add profile fields - start
$custom_line_break = "\n\r";
$cutom_email_content = $custom_line_break
$profile1.$custom_line_break.
$profile2.$custom_line_break.
$profile3.$custom_line_break.
$profile4.$custom_line_break.
$profile5.$custom_line_break.
$profile6';
// custom hack: add profile fields - end
That worked.
Thanks