View Full Version : SQL data created upon registration
h_kakashi
Tue 13th Jun '06, 11:47am
Hi, I was wondering if anyone could give me the tables and columns that are affected upon a user registration.
I know that data is added into the fields in the `user` table, but where else is stuff put when a new user registers?
Also, how does VB's cookie/session creation and authentication work? I'm trying to integrate my forum and CMS so that if a user logs in the forum, he'd be logged in on the CMS and vice versa... I tried including global.php and checking for $bbuserinfo but all I got was 'NULL' for the contents, also how exactly is this variable created (if I wanted to make the session/cookie in my CMS login script).
Wayne Luke
Tue 13th Jun '06, 11:51am
If you are trying to programmatically add users to vBulletin, I would suggest using the data manager to do this. It will properly populate all the required fields and tables so you don't accidently miss something or if there is new information to be stored in the future, you won't have to modify your own code as much. There is a tutorial at www.vbulletin.org on how to use the User Data Manager.
h_kakashi
Tue 13th Jun '06, 12:50pm
I tried doing it by using the vbulletin backend... but I just lose myself among the tons of variables, i've already created all the variables required to enter into the `user` table myself, but what other data entries are required upon a new registration?
Also, I might have to end up using global.php to check for the session/cookie, any idea on how I would accomplish that?
Wayne Luke
Tue 13th Jun '06, 12:58pm
Questions like these are best answered at vBulletin.org.
User record is in four tables though. access, user, userfield and usertextfield.
h_kakashi
Tue 13th Jun '06, 1:36pm
Cool thanks, I just need to figure out how to check $bbuserinfo and store data in that variable.
h_kakashi
Tue 13th Jun '06, 2:43pm
Hmm, the other fields you mentioned...
access contains no rows
userfield has a row with the userid but all the fields contain 'NULL'
usertextfield is the same as userfield
So im guessing I just have to increment a row in userfield and usertextfield when registering a user?
Marco van Herwaarden
Wed 14th Jun '06, 4:47am
You really want to use the datamanagers instead. The datamanager will make sure that only valid and complete data is written to the DB, and you would have less problems if there are some changes in the future.
vBulletin® v3.8.0 Beta 4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.