Log on to discuz directly without activation. Test version: discuz! X3, the theory also supports 2.5. Let's test it again.
Log on to discuz directly without activation. Test version: discuz! X3, the theory also supports 2.5. Let's test it again.
The Code is as follows:
// Open discuz/api/uc. php
// At the synlogin method (Row 1), 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 );
}
}
}