Take a look at the second-to-last line (DB_site).
Code:
// ###################### Start do moderate and coppa #######################
if ($HTTP_POST_VARS['action']=="domoderate") {
while (list($key,$val)=each($validate)) {
if ($val==1) {
$user=$DB_site->query_first("SELECT username,email FROM user WHERE userid=$key");
$username=unhtmlspecialchars($user[username]);
eval("\$message = \"".ereg_replace("\"","\\\"",$email)."\";");
eval("\$subject = \"".ereg_replace("\"","\\\"",$subject)."\";");
mail ($user[email],$subject,$message,"From: $webmasteremail");
$DB_site->query("UPDATE user SET usergroupid=2 WHERE userid=$key");
}
}
echo "<p>Accounts validated and users notified</p>";
}
Where it says SET usergroupid=2, I would like instead for it to set the usergroupid to a custom user field number that is selected at registration.
So, instead of SET usergroupid=2, I'd like it to say, SET usergroupid=field8.
Except, this doesn't work - I don't know how to properly insert the value of field8 into usergroupid. Any suggestions?