Cshop的验证邮件默认只能用户登录用户中心点击发送才能收到,这里让他改为用户注册时自动发送。适当编写邮件内容也可以让他同时具有注册通知邮件的效果。
在user.php 里面的 大概235行 if (!empty($passwd_answer) && !empty($sel_question)) { $sql = 'UPDATE ' . $ecs->table(’users’) . ” SET `passwd_question`=’$sel_question’, `passwd_answer`=’$passwd_answer’ WHERE `user_id`=’” . $_SESSION['user_id'] . “'”; $db->query($sql); }
$ucdata = empty($user->ucdata)? “” : $user->ucdata;
下添加 /* 发送邮件 */ $cfg = $_CFG['smtp_user']; if(!empty($cfg) ) { $sql=”select user_id from “.$GLOBALS['ecs']->table(’users’) .”where user_name = '$username’”; $user_id=$db->getOne($sql); send_regiter_hash ($user_id); }
|