码迷,mamicode.com
首页 > 其他好文 > 详细

Ucenter注册后,需要二次登录才能同步登录的解决方案

时间:2014-09-25 19:34:47      阅读:197      评论:0      收藏:0      [点我收藏+]

标签:blog   os   for   文件   div   cti   on   c   log   

1.
打开配置文件config.inc.php 在根目录data目录下
最下方定义 define(‘DZ_DBTABLEPRE‘, ‘你的表前缀‘);

2.打开uc_server/model/user.php add_user函数
在retun之前加入以下代码
// BEGIN
        $this->db->query("INSERT INTO ".DZ_DBTABLEPRE."common_member SET uid=‘$uid‘, username=‘$username‘, password=‘$password‘, email=‘$email‘, adminid=‘0‘, groupid=‘10‘, regdate=‘".$this->base->time."‘, credits=‘0‘, timeoffset=‘9999‘");
        $this->db->query("INSERT INTO ".DZ_DBTABLEPRE."common_member_status SET uid=‘$uid‘, regip=‘$regip‘, lastip=‘$regip‘, lastvisit=‘".$this->base->time."‘, lastactivity=‘".$this->base->time."‘, lastpost=‘0‘, lastsendmail=‘0‘");
        $this->db->query("INSERT INTO ".DZ_DBTABLEPRE."common_member_profile SET uid=‘$uid‘, realname=‘$real‘");
        $this->db->query("INSERT INTO ".DZ_DBTABLEPRE."common_member_field_forum SET uid=‘$uid‘");
        $this->db->query("INSERT INTO ".DZ_DBTABLEPRE."common_member_field_home SET uid=‘$uid‘");
        $this->db->query("INSERT INTO ".DZ_DBTABLEPRE."common_member_count SET uid=‘$uid‘, extcredits1=‘0‘, extcredits2=‘0‘, extcredits3=‘0‘, extcredits4=‘0‘, extcredits5=‘0‘, extcredits6=‘0‘, extcredits7=‘0‘, extcredits8=‘0‘");
        // END

  

Ucenter注册后,需要二次登录才能同步登录的解决方案

标签:blog   os   for   文件   div   cti   on   c   log   

原文地址:http://www.cnblogs.com/seaning/p/3993068.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!