cheechm Posted September 30, 2007 Share Posted September 30, 2007 Hi, I have a forum and an auction site. Literally the users sign up at the vBulletin forum and they are automatically signed up to the Auction site. Here is part of the auction site login script.: if (isset($_POST['loginok'])||$_POST['islogin']=="yes") { $userDetails = getSqlRow("SELECT * FROM probid_users WHERE username='".$_POST['username']."'"); $salt = getSqlRow("SELECT salt FROM probid_users WHERE username='".$_POST['username']."'"); if ($setts['account_mode_personal']==1) { $account_mode_local = ($userDetails['payment_mode']==1) ? 2 : 1; } else $account_mode_local = $setts['account_mode']; if (substr($userDetails['password'],0,10)==substr(md5(md5($_POST['password']) . $salt),0,10)&&$_POST['password']!=""&&$_POST['username']!="") { I can't however login in. It says incorrrect password. I have check all the data is in the table, including salt. However I don't know if I have done this bit right: substr(md5(md5($_POST['password']) . $salt) I was told it should be like this: $password_hash = md5(md5($password_text) . $user_salt); What am I doing wrong? Thanks Link to comment https://forums.phpfreaks.com/topic/71282-solved-bridging-to-vbulletin/ Share on other sites More sharing options...
cheechm Posted September 30, 2007 Author Share Posted September 30, 2007 Anyone? Link to comment https://forums.phpfreaks.com/topic/71282-solved-bridging-to-vbulletin/#findComment-358609 Share on other sites More sharing options...
cheechm Posted October 1, 2007 Author Share Posted October 1, 2007 Bump Link to comment https://forums.phpfreaks.com/topic/71282-solved-bridging-to-vbulletin/#findComment-359181 Share on other sites More sharing options...
jaymc Posted October 1, 2007 Share Posted October 1, 2007 Looking briefly.. $password_hash = md5(md5($password_text) . $user_salt); Surely thats hashing the password twice, so in enhance, hashing a hash Maybe thats the way it works..? If not, maybe something to look into because I've never known a hash hash So maybe try $password_hash = md5($password_text); Link to comment https://forums.phpfreaks.com/topic/71282-solved-bridging-to-vbulletin/#findComment-359187 Share on other sites More sharing options...
cheechm Posted October 1, 2007 Author Share Posted October 1, 2007 Thanks. Will have a try and get back to you. Anyone else have any clue? Because I definetley don't EDIT: Didn't work. Link to comment https://forums.phpfreaks.com/topic/71282-solved-bridging-to-vbulletin/#findComment-359607 Share on other sites More sharing options...
cheechm Posted October 1, 2007 Author Share Posted October 1, 2007 It actually worked. Added an extra character by accident the first time. Thank you soo much. Link to comment https://forums.phpfreaks.com/topic/71282-solved-bridging-to-vbulletin/#findComment-359634 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.