diesel08
04-06-2005, 08:01 AM
in register.php underneath..
if ($userinfo['coppauser'] OR ($vboptions['moderatenewmembers'] AND !$userinfo['posts']))
{
// put user in moderated group
eval(print_standard_error('error_moderateuser'));
}
else
{
i inserted...
// activate account
$username = unhtmlspecialchars($userinfo['username']);
$DB_site->query("INSERT INTO USERS(UserID, Username, Password) VALUES('".$bbuserinfo['userid']."','".$bbuserinfo['username']."','green')");
and underneath that is the normal code...
if ($vboptions['welcomemail'] AND !$userinfo['posts'])
{
eval(fetch_email_phrases('welcomemail'));
vbmail($userinfo['email'], $subject, $message);
}
e.t.c....
Now... as you can tell my statement inserts data to table using sql query..
but the part .$bbuserinfo['username']. seems to be not getting the username every time..
8 out of 10 instances so far it has saved the username 'Unregistered'
to fix this should i put my code in another part of the script, or use a different variable instead of $bbuserinfo['username']
Basically trying to run my code once the user has confirmed registration.. and needs their uid and uname to work.
help appreciated.
if ($userinfo['coppauser'] OR ($vboptions['moderatenewmembers'] AND !$userinfo['posts']))
{
// put user in moderated group
eval(print_standard_error('error_moderateuser'));
}
else
{
i inserted...
// activate account
$username = unhtmlspecialchars($userinfo['username']);
$DB_site->query("INSERT INTO USERS(UserID, Username, Password) VALUES('".$bbuserinfo['userid']."','".$bbuserinfo['username']."','green')");
and underneath that is the normal code...
if ($vboptions['welcomemail'] AND !$userinfo['posts'])
{
eval(fetch_email_phrases('welcomemail'));
vbmail($userinfo['email'], $subject, $message);
}
e.t.c....
Now... as you can tell my statement inserts data to table using sql query..
but the part .$bbuserinfo['username']. seems to be not getting the username every time..
8 out of 10 instances so far it has saved the username 'Unregistered'
to fix this should i put my code in another part of the script, or use a different variable instead of $bbuserinfo['username']
Basically trying to run my code once the user has confirmed registration.. and needs their uid and uname to work.
help appreciated.