![]() |
|
Thread Tools |
#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?
Thanks No members have liked this post.
Last edited by tsptom; 14 Feb 2014 at 23:23. |
#2
|
||||
|
||||
Well, to check if a username, password combination is valid in the vbulletin database, you'd do something like:
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. No members have liked this post.
|
#3
|
|||
|
|||
Thanks, I will try that.
No members have liked this post.
|
![]() |
«
Previous Thread
|
Next Thread
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 23:12.