The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How to add user into the VB Forum using SQL Statement?
Hi,
I want to add big bulk of users into the VB Forum. I've tried to add one using this query: Insert Into vbdatabase.user (usergroupid, membergroupids, displaygroupid, username, password, passworddate, email, styleid, parentemail, homepage, icq, aim, yahoo, showvbcode, usertitle, customtitle, joindate, daysprune, lastvisit, lastactivity, lastpost, posts, reputation, reputationlevelid, timezoneoffset, pmpopup, avatarid, avatarrevision, options, birthday, birthday_search, maxposts, startofweek, ipaddress, referrerid, languageid, msn, emailstamp, threadedmode, autosubscribe, pmtotal, pmunread, salt) values (3, '', 0, 'bukharia', '', '2004-09-12', 'bukhari00@yahoo.com', 1, '', '', '', '', '', 1, 'Junior Member', 0, 1094990400, 0, 1094996400, 1094996400, 0, 0, 10, 5, 3, 0, 0, 0, 7255, '', '0000-00-00', -0, 1, '', 0, 0, '', 0, 0, -1, 0, 0, '<%Z') The user is added successfully, and I logged in using the new created User ID with no password. The issue is that the User ID is not working correctly. Kindly provide me with the steps that I can add new users using SQL statements, either in the database directly or from a PHP script. Thanks & Regards, |
#2
|
||||
|
||||
You'll have to add some other things like a new row in the userfield table.
I can't tell you what else, as I'm at work atm. |
#3
|
|||
|
|||
any update?
|
#4
|
|||
|
|||
i also tried it
Quote:
$newuserid = $DB_site->insert_id(); and when this didnt worked i added : $DB_site->query(" UPDATE " . TABLE_PREFIX . "user SET userid = '$id' WHERE username = 'bukharia' "); but didnt worked as well any idea's ? |
#5
|
||||
|
||||
the insert_id() should return the id you inserted....
You'll have to add userfield, usertextfield as well... |
#6
|
|||
|
|||
Quote:
but they got deafult value's that if you not add them its sets them alone for exsample styleid deafult=0 so if you not add it on the query mysql set it alone i also did view (on phpmyadmin) and they colmuns you said got the deafult value.. so are u sure about what you saying? edit :: never mind i got you worng needed to read few times to understand what you wanted |
#7
|
||||
|
||||
I don't quiite understand your question...
you'll have to set up the fields, even if they are empty. Also, look in the register.php for what queries are used there. |
#8
|
|||
|
|||
ok i tested it and its works hmm nnjj.net here is your answer :
after Quote:
$newuserid = $DB_site->insert_id(); $DB_site->query("INSERT INTO " . TABLE_PREFIX . "usertextfield (userid)VALUES ('$newuserid') "); $DB_site->query("INSERT INTO " . TABLE_PREFIX . "userfield (userid)VALUES ('$newuserid') "); and its should work (working for me) btw how the salt system working ? do you know colin ? im doing same thing only from other php page so i need to answer correct password and im sure its not md5(password); any idea ? |
#9
|
||||
|
||||
IIRC, its
md5(md5($password).$salt) |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|