找回密码
 立即注册
搜索
热搜: 推广 工具 数据
查看: 73|回复: 0

整合 UCenter,同步注册到 Discuz! X3.X

admin 发表于 2024-10-15 14:14:29
应用整合 UCenter,同步注册到 Discuz 的用户,在 Discuz 登录时得手动激活,用户体验很不好,查了资料修改应用下的 ./uc_client/model/user.php 文件之后不生效。

具体解决办法



修改 ./uc_server/model/user.php下的文件




搜索 function add_user 里的

  1. $this->db->query("INSERT INTO ".UC_DBTABLEPRE."memberfields SET uid='$uid'");
复制代码
  1. $this->db->query("INSERT INTO `dbname`.pre_common_member SET uid='$uid', username='$username', password='$password', email='$email', adminid='0', groupid='10', regdate='".$this->base->time."', credits='0', timeoffset='9999'");
  2.     $this->db->query("INSERT INTO `dbname`.pre_common_member_status SET uid='$uid', regip='$regip', lastip='$regip', lastvisit='".$this->base->time."', lastactivity='".$this->base->time."', lastpost='0', lastsendmail='0'");
  3.     $this->db->query("INSERT INTO `dbname`.pre_common_member_profile SET uid='$uid'");
  4.     $this->db->query("INSERT INTO `dbname`.pre_common_member_field_forum SET uid='$uid'");
  5.     $this->db->query("INSERT INTO `dbname`.pre_common_member_field_home SET uid='$uid'");
  6.     $this->db->query("INSERT INTO `dbname`.pre_common_member_count SET uid='$uid', extcredits1='0', extcredits2='0', extcredits3='0', extcredits4='0', extcredits5='0', extcredits6='0', extcredits7='0', extcredits8='0'");
复制代码
或者
  1.     $this->db->query("INSERT INTO ".DISCUZ_DBTABLEPRE."common_member SET uid='$uid', username='$username', password='$password', email='$email', adminid='0', groupid='10', regdate='".$this->base->time."', credits='0', timeoffset='9999'");
  2.     $this->db->query("INSERT INTO ".DISCUZ_DBTABLEPRE."common_member_status SET uid='$uid', regip='$regip', lastip='$regip', lastvisit='".$this->base->time."', lastactivity='".$this->base->time."', lastpost='0', lastsendmail='0'");
  3.     $this->db->query("INSERT INTO ".DISCUZ_DBTABLEPRE."common_member_profile SET uid='$uid'");
  4.     $this->db->query("INSERT INTO ".DISCUZ_DBTABLEPRE."common_member_field_forum SET uid='$uid'");
  5.     $this->db->query("INSERT INTO ".DISCUZ_DBTABLEPRE."common_member_field_home SET uid='$uid'");
  6.     $this->db->query("INSERT INTO ".DISCUZ_DBTABLEPRE."common_member_count SET uid='$uid', extcredits1='0', extcredits2='0', extcredits3='0', extcredits4='0', extcredits5='0', extcredits6='0', extcredits7='0', extcredits8='0'");
复制代码



参考链接
https://www.cnblogs.com /yipianchuyun/p/12393346.html


您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|小黑屋|TradeCBS

GMT+8, 2024-12-27 09:56 , Processed in 0.047305 second(s), 14 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表