PDA

View Full Version : Best method of identifying users from the db?


Sykoi
01-21-2007, 08:30 PM
I need to find a method to confirm a user is who they say they are from another site, by checking the vB_user table, from a site outside of vBulletin's architecture... Now I was going to have them enter their user id, and a hidden profile key they pick themselves, but I'm not sure if this is such a great idea... What would be a good idea?

Could I just confirm it with id, md5(md5(password,$salt)) or whatever password protection method vBulletin uses?

Attilitus
01-21-2007, 09:25 PM
Well additional information would be useful. Such as the degree of access that you have to the external database.

Adrian Schneider
01-21-2007, 09:28 PM
Check their username/password against the vB. database.

select userid
from user
where username = 'usetname sent' and password = md5(concat(md5('password sent'), salt));

Sykoi
01-21-2007, 09:31 PM
So...

SELECT * from vb3_user WHERE userid=### AND password=md5(concat(md5(password),vb3_user.salt))

Is this correct? Or are you referring to php functions of md5/concat and not mysql (Is concat even in mysql...?)

And as for the extent at which I have access, I have complete access to the database but no access to the vB php files.

Also, while I have asked this before I'll ask again - is there any way to create a forum "blindly", as in outside the architecture? I looked at the forums table and its incredibly complex and requires some vB-only generated things.

Adrian Schneider
01-21-2007, 09:33 PM
Do it in MySQL, it is simpler that way (my query should work). Get them to enter their username - not their userid. You can change my select userid to select *

Sykoi
01-22-2007, 03:07 AM
Well my problem with entering a user's name is that ... Is, well - easy to screw up... A lot of my forum members have unicode in their name, spaces in their name, etc.... Things that are easy to mess up

Adrian Schneider
01-22-2007, 03:09 AM
Well how do they sign-on in the first place? :)

Userid is easy too, simple enough to change that in the above query...

Sykoi
01-22-2007, 03:12 AM
Good point... Guess userid is kind of hard for some people to get, although my concern was the people (Like myself) who click "Remember me"... I haven't logged in for almost a year :P

Anyways, on a related note - whats the best way to create a new forum blindly?:

Also, while I have asked this before I'll ask again - is there any way to create a forum "blindly", as in outside the architecture? I looked at the forums table and its incredibly complex and requires some vB-only generated things.

Adrian Schneider
01-22-2007, 03:16 AM
I don't have the time to go into much detail, but you could take the array that vBulletin generates and share that with your other site (save as .php file using var_export or serialized array). That would make it easier to process.

Sykoi
01-22-2007, 03:18 AM
So basically get the function in the admin area to generate a new forum, use it to generate a dummy forum with the permissions I need, access the data inside that (Securely with a keycode or something) using readfile or fopen, unserialize the array, and simply replace the variables I need and commit that to the database...?

Adrian Schneider
01-22-2007, 03:22 AM
Oh *create*; I thought you meant like duplicate the forums onto another page. What would the forum do?

Sykoi
01-22-2007, 03:25 AM
Well basically I want to give my users the ability to create a "family forum" (Think a clan area), and have control over it... Now I want to control WHEN they're able to do it, like reaching a certain activity level...
They'd be able to password it, unpassword it... And of course moderate it and all that basic stuff (But moderation from the forum, not the site)

I just realized... I could just make a dummy forum thats invisible, then get that ID from the db and modify whatever I need, and re-insert it... However, are there any other tables I need to add data to in order for it to work?