OK, here's the entire code for include/register.php
It's all in 1 piece, but I divided it into 3 sections here to indicate the section that I changed. (1st piece of original code removed by request)
Here's the bit I changed:
Code:
#
# Send mail to registered user (do not send to anonymous)
#
if ($config["General"]["modify_emails"]=="Y"){
if(!$anonymous_user)
if ($usertype=="B")
func_send_mail($email, "mail/signin_notification_subj.tpl", "mail/signin_partner_notif.tpl", $config["Company"]["users_department"], false);
else
func_send_mail($email, "mail/signin_notification_subj.tpl", "mail/signin_notification.tpl", $config["Company"]["users_department"], false);
#
# Send mail to customers department
#
if(!$anonymous_user)
func_send_mail($config["Company"]["users_department"], "mail/signin_admin_notif_subj.tpl", "mail/signin_admin_notification.tpl", $email, true);
}
This is original code at the end
Code:
#
# Auto-log in
#
#if($anonymous_user && $usertype=="C") {
if($usertype=="C" or ($usertype=="B" and $login=="")) {
$auto_login = true;
$login = $uname;
$login_type = $usertype;
$logged = "";
}
}
} else {
#
# Fields filled with errors
#
if ($fillerror) $reg_error="F";
if ($eerror) $reg_error="E";
if ($uerror) $reg_error="U";
}
if($anonymous_user) {
$uname="";
$passwd1="";
$passwd2="";
}
#
# Fill $userinfo array if error occured
#
$userinfo=$HTTP_POST_VARS;
$userinfo["login"] = $uname;
$userinfo["newsletter"] = ($newsletter=="on"?"Y":"");
}
else {
#
# REQUEST_METHOD = GET
#
if ($mode=="update") {
$userinfo = func_userinfo($login,$login_type);
}
elseif ($mode=="delete" && $confirmed=="Y") {
$olduser_info = func_userinfo($login,$login_type);
$customer_language = func_get_language ($olduser_info);
func_delete_profile($login,$login_type);
$login="";
$login_type="";
$smarty->clear_assign("login");
#
# Send mail notifications to customer department and signed customer
#
$mail_smarty->assign("userinfo",$olduser_info);
#
# Send mail to registered user
#
if (strstr($olduser_info["login"], $anonymous_username_prefix) ) $anonymous_user=true;
else $anonymous_user=false;
if(!$anonymous_user)
func_send_mail($olduser_info["email"], "mail/profile_deleted_subj.tpl", "mail/profile_deleted.tpl", $config["Company"]["users_department"], false);
#
# Send mail to customers department
#
if(!$anonymous_user)
func_send_mail($config["Company"]["users_department"], "mail/profile_admin_deleted_subj.tpl", "mail/profile_admin_deleted.tpl", $olduser_info["email"], true);
}
}
#require "../include/countries.php";
#require "../include/states.php";
#$smarty->assign("current_category",$current_category);
if ($uerror || $eerror || $fillerror || $error) {
$userinfo[firstname]=stripslashes($firstname);
$userinfo[lastname]=stripslashes($lastname);
$userinfo[company]=stripslashes($company);
$userinfo[ssn]=stripslashes($ssn);
$userinfo[b_address]=stripslashes($b_address);
$userinfo[b_city]=stripslashes($b_city);
$userinfo[b_state]=stripslashes($b_state);
$userinfo[b_zipcode]=stripslashes($b_zipcode);
$userinfo[s_address]=stripslashes($s_address);
$userinfo[s_city]=stripslashes($s_city);
$userinfo[s_state]=stripslashes($s_state);
$userinfo[s_zipcode]=stripslashes($s_zipcode);
$userinfo[phone]=stripslashes($phone);
$userinfo[fax]=stripslashes($fax);
$userinfo[uname]=stripslashes($uname);
$userinfo[login]=stripslashes($uname);
$userinfo[passwd1]=stripslashes($passwd1);
$userinfo[passwd2]=stripslashes($passwd2);
$userinfo[password_hint]=stripslashes($password_hint);
$userinfo[password_hint_answer]=stripslashes($password_hint_answer);
}
if ($userinfo)
foreach ($userinfo as $key=>$value){
if (is_string($value))
$userinfo[$key]=htmlspecialchars($value);
}
$smarty->assign("userinfo",$userinfo);
$smarty->assign("registered",$registered);
$smarty->assign("reg_error",$reg_error);
if($mode=="delete") {
$smarty->assign("main","profile_delete");
}
elseif($mode=="notdelete") {
$smarty->assign("main","profile_notdelete");
}
else
$smarty->assign("main","register");
x_session_save();
?>
Thoughts, anyone? Is there something else I need to modify?