No need to activate direct synchronous login Discuz, beta version: discuz! x3, the theory also supports 2.5, we test and use it again
Code as follows://Open discuz/api/uc.php//synlogin method (180 lines), down to find if (($member = Getuserbyuid ($uid, 1)) { Dsetcoo Kie (' auth ', Authcode ("$member [Password]t$member[uid]", ' ENCODE '), $cookietime); } //Change to if (($member = Getuserbyuid ($uid, 1)) { Dsetcookie (' auth ', Authcode ("$member [password]t $member [uid], ' ENCODE '), $cookietime); else { if (!function_exists (' Uc_get_user ')) { loaducenter (); } &N Bsp $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). "', ' email ' = ' {$user [2]} ', ' Adminid ' = ' 0 ', ' groupid ' = ' ten ', ' 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]", ' Enco DE '), $cookietime); } }/