discuz免激活同步登入代码修改方法(discuz同步登录)

代码如下:

//打开discuz/api/uc.php//synlogin方法(180行)处,往下找到if(($member = getuserbyuid($uid, 1))) { dsetcookie(‘auth’, authcode(“$member[password]\t$member[uid]”, ‘encode’), $cookietime);}

//改为if(($member = getuserbyuid($uid, 1))) { dsetcookie(‘auth’, authcode(“$member[password]\t$member[uid]”, ‘encode’), $cookietime);} else { if(!function_exists(‘uc_get_user’)) { loaducenter(); } $user = uc_get_user($uid, 1); if($user) { $time = time(); db::query(“replace into “.db::table(‘common_member’).” set `uid`='{$user[0]}’ , `username`='{$user[1]}’ , `password`='”.md5(random(10)).”‘ , `email`='{$user[2]}’ , `adminid`=’0′ , `groupid`=’10’ , `regdate`='{$time}’ , `emailstatus`=’0′ , `credits`=’0′ , `timeoffset`=’9999′”); db::query(“replace into “.db::table(‘common_member_status’).” set `uid`='{$user[0]}’ , `regip`='{$_g[‘clientip’]}’ , `lastip`='{$_g[‘clientip’]}’ , `lastvisit`='{$time}’ , `lastactivity`=” , `lastpost`=’0′ , `lastsendmail`=’0′”); db::query(“replace into “.db::table(‘common_member_count’).” set `uid`='{$user[0]}’ , `extcredits1`=’0′ , `extcredits2`=’0′ , `extcredits3`=’0′ , `extcredits4`=’0′ , `extcredits5`=’0′ , `extcredits6`=’0′ , `extcredits7`=’0′ , `extcredits8`=’0′”); db::query(“replace into “.db::table(‘common_member_profile’).” set `uid`='{$user[0]}'”); db::query(“replace into “.db::table(‘common_member_field_forum’).” set `uid`='{$user[0]}'”); db::query(“replace into “.db::table(‘common_member_field_home’).” set `uid`='{$user[0]}'”); db::query(“update “.db::table(‘common_stat’).” set `register`=`register`+1 where `daytime` = ‘”.date(‘ymd’, $time).”‘”); if(($member = getuserbyuid($uid, 1))) { dsetcookie(‘auth’, authcode(“$member[password]\t$member[uid]”, ‘encode’), $cookietime); } }}

http://www.bkjia.com/phpjc/621671.htmlwww.bkjia.comtruehttp://www.bkjia.com/phpjc/621671.htmltecharticle 代码如下: //打开discuz/api/uc.php //synlogin方法(180行)处,往下找到 if(($member = getuserbyuid($uid, 1))) { dsetcookie(‘auth’, authcode(“$member[pas…

Posted in 未分类