The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Checking VB Password Outside the Forum
I have another area of my website that requires a login and sometimes members use a different password for this login than the one they use in the forum. This is probably frustrating for them as they try to remember which PW goes where.
I would like to be able to have them log into this other area using the PW they set up OR their forum PW if it is different. I'm not sure exactly how this would be done but maybe something along these lines? Quote:
Thanks |
#2
|
|||
|
|||
Well, to check if a username, password combination is valid in the vbulletin database, you'd do something like:
Code:
if ($entered_password == md5(md5($password) . $salt)) { // valid password } where $entered_password is the password that was entered, and $password and $salt are the fields from the vbulletin user table where the 'username' column equals the entered username. (I hope that makes sense). I don't know how to write the code for you because I don't know the context of where you're trying to put it. But if I were doing it I'd probably do a couple 'SELECTS" to get the information I needed from the database, then write php to check (as opposed to doing it all in one sql statement, although that may be possible). Also I wanted to mention that if you do write something like you posted above, don't use fields from $_POST[] directly in a query string because you don't know what they might contain. At the least, you should use mysql_real_escape_string() (or the equivalent if you're not using the mysql_* functions) to make sure any special characters are escaped. |
#3
|
|||
|
|||
Thanks, I will try that.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|