I have created a login share where if they register at our main site they will automatically be registered to our forums. This works fine but on the forums at the bottom where it has "Welcome to our newest member, xxxx" never seems to update unless I go to admincp and update the users through the reset counters.
So I was wondering if I am missing a field with my insert?
Here is the code I have:
PHP Code:
$sSQL='INSERT INTO '.$tableprefix.'user SET
username = "'.$username.'",
usergroupid = "'.$user['usergroupid'].'",
email = "'.$email.'",
joindate = "'.time().'",
password = "'.$password.'",
lastvisit = "'.time().'",
lastactivity = "'.time().'",
passworddate = NOW(),
showvbcode = 1,
daysprune = "-1",
timezoneoffset = 0,
options = "3159",
salt = "'.$salt.'"';
$result=$database_vb->query($sSQL);
$userid=$result->insertID();
$sSQL='INSERT INTO '.$tableprefix.'usertextfield SET userid = '.$userid;
$database_vb->query($sSQL);
$sSQL='INSERT INTO '.$tableprefix.'userfield SET userid = '.$userid;
$database_vb->query($sSQL);
$sSQL='INSERT INTO '.$tableprefix.'passwordhistory SET userid = '.$userid.', password = "'.$password.'", passworddate = NOW()';
$database_vb->query($sSQL);