discuz免激活同步登入代碼修改方法(discuz同步登錄)
//打開(kāi)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)淘寶客服或阿里旺旺聊天功能(前臺(tái)頁(yè)面)
這篇文章主要介紹了用php+mysql+ajax實(shí)現(xiàn)淘寶客服或阿里旺旺聊天功能之前臺(tái)頁(yè)面,非常不錯(cuò),具有參考借鑒價(jià)值,需要的朋友可以參考下2017-06-06全新的PDO數(shù)據(jù)庫(kù)操作類(lèi)php版(僅適用Mysql)
在公司里也用了1年之久。如今公司規(guī)模變大了,產(chǎn)品也日益完善,曾經(jīng)的那個(gè)數(shù)據(jù)庫(kù)操作函數(shù)雖說(shuō)使用上沒(méi)出什么大問(wèn)題,但為了更顯專(zhuān)業(yè),花了1天時(shí)間重寫(xiě)了這個(gè),現(xiàn)在,它確實(shí)是個(gè)類(lèi)了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-11解決laravel查詢(xún)構(gòu)造器中的別名問(wèn)題
今天小編就為大家分享一篇解決laravel查詢(xún)構(gòu)造器中的別名問(wèn)題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧2019-10-10用php+ajax新建流程(請(qǐng)假、進(jìn)貨、出貨等)
這篇文章主要介紹了用php+ajax新建流程(請(qǐng)假、進(jìn)貨、出貨等),需要的朋友可以參考下2017-06-06yii2使用GridView實(shí)現(xiàn)數(shù)據(jù)全選及批量刪除按鈕示例
本篇文章主要介紹了yii2使用GridView實(shí)現(xiàn)數(shù)據(jù)全選及批量刪除按鈕示例,具有一定的參考價(jià)值,有興趣的可以了解一下。2017-03-03thinkPHP3.2簡(jiǎn)單實(shí)現(xiàn)文件上傳的方法
這篇文章主要介紹了thinkPHP3.2簡(jiǎn)單實(shí)現(xiàn)文件上傳的方法,重點(diǎn)介紹了thinkPHP實(shí)現(xiàn)文件上傳功能的控制器文件相關(guān)技巧,需要的朋友可以參考下2016-05-05php array_merge_recursive 數(shù)組合并
這篇文章主要介紹了php array_merge_recursive 將兩個(gè)或多個(gè)數(shù)組合并為一個(gè)數(shù)組的相關(guān)資料,需要的朋友可以參考下2016-10-10