Quote:
Originally posted by zonegray
Did this go any further? Found this discussion looking for something similar (want to put users in a special group based on a code they enter at registration). Can't seem to find anything in Firefly's released hacks or betas.
|
Login Admin CP, create a new user profile field, make it invisible to other users, note its id..
Edit register.php, find:
PHP Code:
$DB_site->query("UPDATE user SET usergroupid=2$dotitle WHERE userid='$u'");
Replace it AS:
PHP Code:
$userfields=$DB_site->query_first("SELECT * FROM userfield WHERE userid='$u'");
if ($userfields['fieldX']=='YYY')
{
$DB_site->query("UPDATE user SET usergroupid=Z$dotitle WHERE userid='$u'");
}
else
{
$DB_site->query("UPDATE user SET usergroupid=2$dotitle WHERE userid='$u'");
}
Replace X with your profile field id.
Replace YYY with your secret code
Replace Z with the usergroup id users will be inserted..
This will work provided that:
1- You didnt enable new user moderation
2- You enabled email validation
3- I dont know about COPPA thing but I guess it wouldnt matter..
Not tested but should work..