The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Registering on non-vb pages?
We have a main site and a forum and the only thing I want to share between the two is the user table.
The main site has it's own database classes, caching classes and session handling etc.. so I'm not wanting to run the registration through vBulletin and it's datamanager. I can imagine it's not as easy as just inserting and updating the user table in order to accomplish this. All of our settings are basically fixed so the registration usergroup is always the same, along with the user title etc.. What procedure would I need to take in order to insert into the user table without causing issues with vbulletin? Thank you |
#2
|
|||
|
|||
I think you can create a user by inserting rows in the user, userfield, and usertext tables. In the latter two, the userid has to match but the rest of the fields can be the default values if you don't have data to fill them. But one issue I see is getting the password/salt fields set so that the user can log in to vbulletin. You'd either have to have the user's password in plain text so that you can hash it like vbulletin does, or else modify the vbulletin scripts that check the password to use whatever algorithm your main site uses.
|
#3
|
|||
|
|||
Quote:
$hash = md5(md5($password).$salt); and the function that generates a salt for registration is: PHP Code:
Thanks |
#4
|
|||
|
|||
You're right, those wouldn't be updated. I know you can make a working user by inserting those rows, but I don't know that all the statistics would be correct. But the user statistics are updated in includes/functions_databuild.php, in function build_user_statistics(). It calls build_datastore() which is in includes/functions.php. It just updates the row in the datastore table, unless you have a different datastore cache configured in the config.php, then it needs to call the function to update that as well. If you don't have a cache defined then you're good just doing the update that you see in build_datastore().
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|