PHP群:95885625 Hbuilder+MUI群:81989597 站长QQ:634381967
    您现在的位置: 首页 > CMS教程 > ecshop教程 > 正文

    Ecshop邮件验证注册会员自动发送验证码的方法

    作者:admin来源:网络浏览:时间:2020-09-30 00:07:50我要评论
    导读:ECshop的验证邮件默认只能用户登录用户中心点击发送才能收到,这里将它修改为用户注册时自动发送。在user.php里面的 大概235行if(!emptyem...
    ECshop的验证邮件默认只能用户登录用户中心点击发送才能收到,这里将它修改为用户注册时自动发送。
    在user.php

    里面的 大概235行 

    1.  
    2.          if (!emptyempty($passwd_answer) && !emptyempty($sel_question)) 
    3.          { 
    4.             $sql = ‘UPDATE ‘ . $ecs->table(’users’) . ” SET `passwd_question`=’$sel_question’, `passwd_answer`=’$passwd_answer’   WHERE `user_id`=’” . $_SESSION['user_id'] . “‘”; 
    5.             $db->query($sql); 
    6.          } 
    7.  
    8.          $ucdata = emptyempty($user->ucdata)? “” : $user->ucdata; 
    9.  
    10. 下添加 
    11.           /* 发送邮件 www.bcty365.com*/ 
    12.       $cfg = $_CFG['smtp_user']; 
    13.       if(!emptyempty($cfg) ) 
    14.       { 
    15.              $sql=”select user_id from “.$GLOBALS['ecs']->table(’users’) .”where user_name = ‘$username’”; 
    16.              $user_id=$db->getOne($sql); 
    17.              send_regiter_hash ($user_id); 
    18.           } 

     

    转载请注明(B5教程网)原文链接:https://b5.mxunkeji.com/content-104-3188-1.html
    相关热词搜索: