The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
mysql insert query to add new user from outside vBulletin
My vBulletin install is in addition to the main part of my site which requires a separate registration. Once a user confirms their registration I want to automatically register them with my vBulletin forum also. The sql query to do so inserts the user's data into the user table in vBulletin alright, but the user cannot then log in using that data. Obviously there must be something missing from my query but I can't seem to find anything on the community forums or in the documentation.
The query is as follows: Code:
$forum_password = MD5($password); $date = date("Y-m-d"); // format 0000-00-00 $query = (" INSERT INTO user SET userid='0', username='$user', password='$forum_password', passworddate='$date', email='$email', reputation='10', reputationlevelid='1' "); $result = mysql_query($query); if ($result) { echo "<p>".mysql_affected_rows()." record added to Forum members table for ".$user."</p>"; $forum_reg = true; } else { echo "<p>Error adding ".$user." to Forum members table.</p>"; $forum_reg = false; } Thanks |
#2
|
||||
|
||||
There is more to adding a user than just using a simple query. Use the vBulletin Data Managers. Also, I believe there is a tutorial in the articles section on how this is done.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|