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);
}
}
}
相關(guān)文章
PHP+Mysql+Ajax實(shí)現(xiàn)淘寶客服或阿里旺旺聊天功能(前臺頁面)
這篇文章主要介紹了用php+mysql+ajax實(shí)現(xiàn)淘寶客服或阿里旺旺聊天功能之前臺頁面,非常不錯,具有參考借鑒價值,需要的朋友可以參考下2017-06-06全新的PDO數(shù)據(jù)庫操作類php版(僅適用Mysql)
在公司里也用了1年之久。如今公司規(guī)模變大了,產(chǎn)品也日益完善,曾經(jīng)的那個數(shù)據(jù)庫操作函數(shù)雖說使用上沒出什么大問題,但為了更顯專業(yè),花了1天時間重寫了這個,現(xiàn)在,它確實(shí)是個類了2012-07-07C#使用PHP服務(wù)端的Web Service通信實(shí)例
這篇文章主要介紹了C#使用PHP服務(wù)端的Web Service通信實(shí)例,需要的朋友可以參考下2014-04-04使用PHP備份MySQL和網(wǎng)站發(fā)送到郵箱實(shí)例代碼
這篇文章主要介紹了使用PHP備份MySQL和網(wǎng)站發(fā)送到郵箱的方法,大家參考使用吧2013-11-11yii2使用GridView實(shí)現(xiàn)數(shù)據(jù)全選及批量刪除按鈕示例
本篇文章主要介紹了yii2使用GridView實(shí)現(xiàn)數(shù)據(jù)全選及批量刪除按鈕示例,具有一定的參考價值,有興趣的可以了解一下。2017-03-03thinkPHP3.2簡單實(shí)現(xiàn)文件上傳的方法
這篇文章主要介紹了thinkPHP3.2簡單實(shí)現(xiàn)文件上傳的方法,重點(diǎn)介紹了thinkPHP實(shí)現(xiàn)文件上傳功能的控制器文件相關(guān)技巧,需要的朋友可以參考下2016-05-05php array_merge_recursive 數(shù)組合并
這篇文章主要介紹了php array_merge_recursive 將兩個或多個數(shù)組合并為一個數(shù)組的相關(guān)資料,需要的朋友可以參考下2016-10-10