The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Alright im trying to create a login script for the forum, dont ask me why but I need to create another one that logs the user in the forums, one thing got me stuck though, vbulletin encrypts the passwords and I cant figure out there encryption method.
All I need to do is compare the posted password (then encrypt it and i dont know how) to the password in the database, anyone care to show me how to encrypt it, NOTE: I cannot include any of the vbulletin files in my code. Heres what you have to work off of: <?php $username = $_POST['username']; $password = $_POST['password']; ?> I know the password is not just md5'ed i saw something like utf, never heard of it, and theres a salt stored in the database for each user, dont know what its for... please help its really important ![]() |
#2
|
|||
|
|||
![]()
Do a search on 'password salt' in the General Modification Discussion section and you will find many threads anwering this.
|
#3
|
||||
|
||||
![]()
md5( md5( password ) . $salt ); is how the password is saved in the database
|
#4
|
|||
|
|||
![]()
Alright thanks, I wrote up this code:
Code:
$query[select1] = mysql_query("SELECT userid, username, password, salt FROM user WHERE username='".$_POST[username]."' LIMIT 1"); $fetch[select1] = mysql_fetch_array($query[select1]); print md5(md5($_POST[password]).$fetch[select1][salt]); |
#5
|
||||
|
||||
![]()
why cant u include any vbulletin files?
|
#6
|
|||
|
|||
![]()
Because im running this on a diffrent domain than the forums are on (but on the same server).
Im already connected to the database I just need to somehow get the posted password to encrypt correctly to match the one in the database >_> |
#7
|
|||
|
|||
![]()
I read somewhere that md5 encrypts diffrently for diffrent domains, is this true? I thought it was just diffrently for each server... the domain thing isnt gonna be a problem for md5 is it?
Man im stupid, the query wasnt fetching because me being my forgetful self forgot to include config.php so I wasnt even connected to the database, and the script wasnt showing that there was an error, so didnt look like there was anything wrong, I fixed that, now it matches up to the one in the database, thanks again. |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|