The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Authentication Issues
I have a vBulletin community that is using version 3.8.4. I also have a website that uses PHP and MySQL. The website has a link at the bottom for an Admin area I use as a back-end to add stuff to the website. When ever I login to my vBulletin, my site verifies my credentials and displays the link at the bottom. If an admin is not logged in, the link on the site (not vBulletin) will not appear. For some reason, even when I'm logged into vBulletin as admin, the link on the site doesn't appear anymore. It seems like I started having problems with the link on my site not appearing after I upgraded to a newer vBulletin update. Since I updated my vBulletin, does the authentication change? The page I'm trying to get to on the site uses this for authentication:
Code:
$userid = $_COOKIE["bbuserid"]; $cookiepassword = $_COOKIE["bbpassword"]; $license = "VBX_removed_X"; if(isset($_COOKIE["bbuserid"])){ if (!$link = mysql_connect($sqlserver, $sqluser, $sqlpassword)) { echo 'Could not connect to mysql'; exit; } if (!mysql_select_db($forumdb, $link)) { echo 'Could not select database'; exit; } $query="SELECT * FROM user WHERE userid=$userid"; $result=mysql_query($query); $row = mysql_fetch_assoc($result); $username = $row['username']; $dbpassword = $row['password']; $usergroupid = $row['usergroupid']; $correct_cookie_pw = md5($dbpassword . $license); if($cookiepassword == $correct_cookie_pw && $usergroupid == "6"){ Logged in }else{echo "<p align=\"center\">Invalid login or you are not an administrator.<br /><br /><a href=\"Click">http://www.nintendo-daily.com/forums/login.php\">ClickClick"> here to login</a></p>";} }else{echo "<p align=\"center\">You must be logged in as an administrator to access this area.<br /><br /><a href=\"Click">http://www.nintendo-daily.com/forums/login.php\">Click here to login</a></p>";} Any ideas? |
#2
|
|||
|
|||
If you're on 3.8.4 PL2, then the password salt has changed.
Open includes/functions.php and see the defintion in line 37. Code:
Replace $license with the COOKIE SALT as found in includes/functions.php |
#3
|
||||
|
||||
YAY!!!! It works!
Thanks very much JamesC70!!! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|