Tag: DMI its STP one point UCS uid pass sync MoD
Today according to the official website example
Put Ucenter down, directly with the official website example, the user registration log on anything to make it work. It is not possible to log in synchronously.
Research for a long time to find ucenter_client registered users only increase in the pre_ucenter_members table, so you use Ucenter login interface can log on successfully, but. $ucsynlogin this is returned empty, Normally, you should return a bunch of JavaScript to set up cookies so that Discuz will automatically log in synchronously.
Users registered with the interface, you go to discuz user management where is not visible, this time a new name has been added to find the user already exists, prompt activation can. A little activated, and then look at the $ucsynlogin, ya this time only the code back ...
So sync users ' pages in third-party apps
Add the following statement to the activation user before the return of the uc_client\model\user.php add_user function
Begin$this->db->query ("INSERT into ' discuz_x2 '. Discuz_common_member SET uid= ' $uid ', username= ' $username ', Password= ' $password ', email= ' $email ', adminid= ' 0 ', groupid= ', regdate= '. $this->base->time. "', credits= ' 0 ' , timeoffset= ' 9999 '); $this->db->query ("INSERT into ' discuz_x2 '. Discuz_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 ' discuz_x2 '. Discuz_common_member_profile Set uid= ' $uid '); $this->db->query ("INSERT into ' discuz_x2 '. Discuz_common_member_field_forum set uid= ' $uid '"); $this->db->query ("INSERT into ' discuz_x2 '. Discuz_common_member_field_home SET uid= ' $uid '"); $this->db-> Query ("INSERT into ' discuz_x2 '. Discuz_common_member_count SET uid= ' $uid ', extcredits1= ' 0 ', extcredits2= ' 0 ', extcredits3= ' 0 ', extcredits4= ' 0 ', extcredits5= ' 0 ', extcredits6= ' 0 ', extcredits7= ' 0 ', extcredits8= ' 0 ' ");//end
Discuz ucenter third-party bidirectional synchronous Login