Ecshop会员注册信息添加字段方法

1、在数据库ecs_users表中添加字段
2、打开模板里的user_passport.dwt文件中添加输入框
3、打开根目录user.php文件中找到
if (register($username, $password, $email, $other, $original_img) !== false)
$original_img为要添加字段的值

4、打开/includes/lib_passport.php文件中找到
function register($username, $password, $email, $other = array(), $user_sfz_img))
$user_sfz_img为要添加的值

5、打开/includes/modules/integrates/ecshop.php文件修改如下代码
    function ecshop($cfg)
    {
        parent::integrate(array());
        $this->user_table = 'users';
        $this->field_id = 'user_id';
        $this->ec_salt = 'ec_salt';
        $this->field_name = 'user_name';
        $this->field_pass = 'password';
        $this->field_email = 'email';
        $this->field_userSfzImg = 'user_sfz_img'; //ecshop.cx 注册数据库新添加的字段
        $this->field_gender = 'sex';
        $this->field_bday = 'birthday';
        $this->field_reg_date = 'reg_time';
        $this->need_sync = false;
        $this->is_ecshop = 1;
    }
6、打开/includes/modules/integrates/integrate.php文件修改如下代码
function add_user($username, $password, $email, $userSfzImg, $gender = -1, $bday = 0, $reg_date=0, $md5password='')
$userSfzImg为新添加字段的值

7、继续找到下面代码,添加新添加的字段和值
        $fields = array($this->field_name, $this->field_email, $this->field_pass, $this->field_userSfzImg);
        $values = array($post_username, $email, $post_password, $userSfzImg);

本文原创地址:https://www.ecshopok.com/article-442.html
版权所有 © 转载时必须以链接形式注明出处!

觉得本文对您有用,想收藏下来!方法很简单:请点击-〉
我们一直坚持白天工作、晚上熬夜更新资源,付出了巨大的精力和时间,其中的辛酸难以言述。

文章评论

暂无评论,来发表一个吧

发表 取消
充值有惊喜 ECSHOP插件网微信客服edait_cn