The discuz Forum program is not readable and dizzy. in order to integrate forum and website data, you have to read it again. fortunately, you can use a small method to synchronize with the forum after logging on here. you do not need the passport interface.
This is my data for reference only.
Log on and pass two values (username and password );
The code is as follows:
Result ($ db-> query ("SELECT count (*) FROM {$ tablepre} failedlogins WHERE ip = '$ onlineip' AND count> =' $ seccodedata [loginfailedcount] 'AND $ timestamp-lastupdate <= 900 "), 0 );} $ discuz_uid = 0; $ discuz_user = $ discuz_pw = $ discuz_secques = $ md5_password = ''; $ member = array (); $ loginperm = logincheck (); if (! $ Loginperm) {showmessage ('login _ strike');} $ secques = quescrypt ($ questionid, $ answer); if (isset ($ loginauth )) {$ field = 'username'; $ password = 'verified '; list ($ username, $ md5_password) = daddslashes (explode ("\ t", authcode ($ loginauth, 'decodecode'), 1);} else {$ md5_password = md5 ($ password); $ password = preg_replace ("/^ (. {". round (strlen ($ password)/4 ). "})(. + ?) (. {". Round (strlen ($ password)/6 ). "}) $/s", "\ 1 *** \ 3", $ password);} $ query = $ db-> query ("SELECT m. uid AS discuz_uid, m. username AS discuz_user, m. password AS discuz_pw, m. secques AS discuz_secques, m. adminid, m. groupid, m. styleid AS styleidmem, m. lastvisit, m. lastpost, u. allowinvisible FROM {$ tablepre} members m left join {$ tablepre} usergroups u USING (groupid) WHERE m. $ field = '$ username' "); $ membe R = $ db-> fetch_array ($ query); // Determine whether the logon is correct if ($ member ['password']! = $ Md5_password) {echo "the user name or password you entered is incorrect! "; Exit () ;}// execute the following program extract ($ member); $ discuz_userss = $ discuz_user; $ discuz_user = addslashes ($ discuz_user ); if ($ allowinvisible & $ loginmode = 'invisable') | $ loginmode = 'normal ') {$ db-> query ("UPDATE {$ tablepre} members SET invisible = '". ($ loginmode = 'invisable '? 1: 0 ). "'Where uid = '$ member [discuz_uid]'", 'unbuffered');} $ styleid = intval (empty ($ _ POST ['styleid'])? ($ Styleidmem? $ Styleidmem: $ _ DCACHE ['Settings'] ['styleid']): $ _ POST ['styleid']); $ cookietime = intval (isset ($ _ POST ['cookietime'])? $ _ POST ['cookietime']: ($ _ DCOOKIE ['cookietime']? $ _ DCOOKIE ['cookietime']: 0); dsetcookie ('cookietime', $ cookietime, 31536000); dsetcookie ('auth ', authcode ("$ discuz_pw \ t $ discuz_secques \ t $ discuz_uid", 'encoding'), $ cookietime); $ sessionexists = 0; updatesession (); // update the Forum USERPASS data echo "{'action': 'ture '}"; // the data to be output is print_r ($ _ DSESSION ); echo $ discuz_userss;}?>