Discuz does not activate synchronous login code modification method (discuz synchronous login ). Copy the code as follows: open discuzapiuc. at the phpsynlogin method (row 180), find if ($ membergetuserbyuid ($ uid, 1) {dsetcookie (auth, authcode ($ member [pas
The code is as follows:
// Open discuz/api/uc. php
// Locate the synlogin method (row 1) and locate it.
If ($ member = getuserbyuid ($ uid, 1 ))){
Dsetcookie ('auth', authcode ("$ member [password] \ t $ member [uid]", 'encoding'), $ cookietime );
}
// Change
If ($ member = getuserbyuid ($ uid, 1 ))){
Dsetcookie ('auth', authcode ("$ member [password] \ t $ member [uid]", 'encoding'), $ cookietime );
} Else {
If (! Function_exists ('UC _ get_user ')){
Loaducenter ();
}
$ User = uc_get_user ($ uid, 1 );
If ($ user ){
$ Time = time ();
DB: query ("replace ". 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' = '20150 '");
DB: query ("replace ". 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 ". DB: table ('Common _ member_count '). "SET 'uid' = '{$ user [0]}', 'extcredits1' = '0', 'extcredits2' = '0', 'extcredits3' = '0 ', 'extcredits4 '= '0', 'extcredits5' = '0', 'extcredits6 '= '0', 'extcredits7' = '0 ', 'extcreditss' = '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 ('ymmd', $ time ). "'");
If ($ member = getuserbyuid ($ uid, 1 ))){
Dsetcookie ('auth', authcode ("$ member [password] \ t $ member [uid]", 'encoding'), $ cookietime );
}
}
}
The http://www.bkjia.com/PHPjc/621671.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/621671.htmlTechArticle code is as follows: // open discuz/api/uc. php // synlogin method (row 180), locate if ($ member = getuserbyuid ($ uid, 1) {dsetcookie ('auth ', authcode ("$ member [pas...