PDA

View Full Version : Using vB username and password in another script


Cold Steel
06-30-2004, 10:48 PM
This gave me such a headache today.

I installed this other script, but instead of giving it its own database, I added to the vBulletin table so there could be an integrated login.

I couldn't figure out how to get the other script to handle the MD5/salt password, since the script originally didn't encrpyt the password.

I'm using cookies (https://vborg.vbsupport.ru/showthread.php?t=61953) now, but I know there must be a more eloquent way of doing that (and without calling global.php).

Any ideas?

Cold Steel
07-01-2004, 04:28 AM
Ok, after many hours of googling and messing around, I finally got it. Maybe this will help someone else in the future.

$db->query("SELECT * FROM user WHERE username = '$username' AND password= MD5(CONCAT(MD5('$password'), salt)) ");