The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
AddNew User Into........
I Build A Nifty Little Shoping Cart, And It Has It's Own Member Management System, But I Wanted To Add A Small Code To Add The User Into The VB3 Database, But My SQL Query Must Be Wrong.... Or Something. Worked Great In Vb2.3.3.
Code:
$query="INSERT INTO user (usergroupid,username,password,passworddate,email,styleid,usertitle,salt,daysprune,reputation,pmpopup,startofweek,pmtotal,pmunread,threadedmode,autosubscribe,maxpost,referrerid,birthday_search,option,autosubscribe) VALUES ('$usergroupid','$username','$saltedpassword','$transactiondate','$email','0','$title','$salt','0','10','1','1','0','0','0','-1','-1','0','0000-00-00','6487','-1')"; mysql_query($query); $userid=mysql_insert_id(); $query="INSERT INTO userfield SET userid='$userid'"; mysql_query($query); mysql_close(); |
#2
|
|||
|
|||
Wrong area.
|
#3
|
||||
|
||||
*moved*
|
#4
|
|||
|
|||
Anybody?
|
#5
|
||||
|
||||
Are you getting any errors ?
Or is it just not inserting? |
#6
|
|||
|
|||
Not Inserting.
|
#7
|
|||
|
|||
Heres Some The Info:
Code:
$membershipstatus="Active"; $membershipexp=date('Ymd',time()+365*24*3600); $membershippackage="PackageC"; $transactiontype="PackageC"; $transactiondate=date('Ymd',time()); $transactionamount=$HTTP_POST_VARS['mvc_MONEY']; $transactionid=$HTTP_POST_VARS['transaction_id']; $usergroupid="9"; $transactionprocessor="MVC"; $softwarekeys=2; $title='Private Memeber'; $username=$HTTP_POST_VARS['mvc_NICK']; $password=$HTTP_POST_VARS['mvc_PASSWORD']; $nomd5pass=$HTTP_POST_VARS['mvc_PASSWORD']; $password=md5(md5($password)); $email=$HTTP_POST_VARS['mvc_EMAIL']; $salt='AbC'; <- I Change That Every Day. $saltedpassword=md5(md5($password) . $salt); |
#8
|
|||
|
|||
Well I Got That Fixed... Next Problem Is, Am I Doing The Password Encoding Correctly?
Code:
$nomd5pass=$HTTP_POST_VARS['mvc_PASSWORD']; $salt="AbC"; $saltedpassword=md5(md5($nomd5pass) . $salt); |
#9
|
|||
|
|||
Ok I Think I Got The Passwird Thing Worked Out. But VBull. Is Saying The Password Is Wrong Or The User Name Is Invalid....
Heres The Entire Code. Code:
//POST Vars. $username=$HTTP_POST_VARS['mvc_NICK']; $nomd5pass=$HTTP_POST_VARS['mvc_PASSWORD']; $password=md5(md5($password)); $email=$HTTP_POST_VARS['mvc_EMAIL']; $salt="AbC"; //PASSWORD if (strlen(md5($nomd5pass)) == 32) { $saltedpassword=md5($nomd5pass . $salt); } else { $saltedpassword=md5(md5($nomd5pass) . $salt); } //Add User To The VB3 Database. $query="INSERT INTO user (usergroupid,displaygroupid,username,password,passworddate,email,parentemail,usertitle,salt) VALUES ('$usergroupid','$usergroupid','$username','$password','$transactiondate','$email','$email','$title','$salt')"; mysql_query($query); $userid=mysql_insert_id(); $query="INSERT INTO userfield SET userid='$userid'"; mysql_query($query); $query="INSERT INTO usertextfield (userid) VALUES ($userid)"; mysql_query($query); |
#10
|
|||
|
|||
Did I Ask To Hard Of A Question? It Must Be Simple For You Advace Coders
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|