![]() |
Inserting a new user into multiple tables.
Currently on my site you have to register for the site and then again for the forums. What I would like is to be able to have one registration form that registers you for both the forums and the site. When you fill out the form and submit it, 2 queries are sent; 1 query to the actual website table that handles the user functions there and 1 query to the forum table to register the new user. However looking at the vBulletin code there were several queries made to the database for registering a new user. How does one go about accomplishing something like what I'm trying to do? When the user registers he/she should go into to standard usergroup. To make things a little more complex, I want to includ email activation through my site, not the forums. So when a user registers on the site, they are also registered on the forums and receive an email to activate their account. When the account is activated it updates both tables. Any ideas? Thanks. :)
|
Quote:
You are going to want to look at register.php for abit of help |
I don't want to do the registering through the vBulletin end. I want vBulletin to have almost nothing to do with my main site which is why I'm doing it this way. The way it is setup now on my site is you have to register both on the site and the forums and I'm fine with that but I'm sure users would like to ease of one registration process. Also, I have looked through register.php and there were several sections that could potentially be involved with the registration process hence why I'm asking here.
|
Quote:
|
Quote:
|
Quote:
|
I've looked through this file and maybe it's just that I don't understand it but I don't see where exactly this stuff is. I've looked through it and I see where the various actions are being done. I'm not looking for someone to write the code for me but instead point out the necessary code from the vBulletin files I need in order to make this work. I can write the code to integrate what I need as long as I have the right code from vBulletin.
|
Quote:
PHP Code:
|
Quote:
|
yeah. doing it through vbulletin would be much easier. check for the query that inserts the info in the user table (look for something like $userid = $DB_site->insert_id(); ) and then switch databases and insert the stuff you need into your site database. don't forget to switch back to the vbulletin database after that.
|
Quote:
|
Quote:
|
Not that it helps, but try this:
1. install vb fresh, locally 2. register in your fresh vb as a new user 3. monitor the tables Questions: 1. What table(s) was populated? 2. Anything needing done to usergroups? 3. Anything else noticable? I would start there. You can then do it manually once you know what vb requires as a new user. I do think you'll need to have the password for the vb user manually salted and hashed while adding to the vb user table. The email address for that vb user can be associated with your user table in your other app. That could be the common key here. This can actually be approached in many ways but if I was to do this right now, I'd spend 10 minutes installing fresh and doing that I've mentioned above just to be safe .. if you are not fully understanding the vb datastorage methods and coding. Peter |
I haven't done this for user, but basically what you want is the user datamanager
your code will look *something* like this PHP Code:
Its not trivial. |
All times are GMT. The time now is 02:08 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|