最新消息: 新版网站上线了!!!

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

1、在数据库ecs_users表中添加字段

2、在user_passport.dwt模板中添加输入框

3、在user.php 中找到

if (register($username$password$email$other$original_img) !== false)

$original_img为要添加字段的值

 

4、在lib_passport.php中找到

function register($username, $password, $email, $other = array(), $user_sfz_img)

$user_sfz_img为要添加的值


 

5、在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';//注册数据库新添加的字段

        $this->field_gender = 'sex';

        $this->field_bday = 'birthday';

        $this->field_reg_date = 'reg_time';

        $this->need_sync = false;

        $this->is_ecshop = 1;

    }

function add_user($username, $password, $email, $userSfzImg, $gender = -1, $bday = 0, $reg_date=0, $md5password='')6、在integrate.php中找到

$userSfzImg为新添加字段的值

7、找到下面代码,添加新添加的字段和值

$fields = array($this->field_name, $this->field_email, $this->field_pass, $this->field_userSfzImg);

$values = array($post_username, $email, $post_password, $userSfzImg);

 

转载请注明:谷谷点程序 » Ecshop 会员注册信息添加字段方法