DougM
12-26-2004, 06:02 PM
I'm certain this must have been addressed but cannot find it.
I need to change a user's primary usergroup based on their own selection from a menu "Please choose usergroup A, B or C"
I would like this to be done at registration via a custom profile field. I don't know how this would be done as I am also using email verification which dumps everyone into the same Registered User group. Any ideas?
Basically I just need users to select their own primary usergroup without my intervention, if not at registration, then somewhere. I'm really struggling with this. Any help or ideas are most appreciated.
Here is what I tried from another thread. In register.php changed
if ($userinfo['coppauser'] OR ($vboptions['moderatenewmembers'] AND !$userinfo['posts']))
{
// put user in moderated group
$user['usergroupid'] = 4;
}
if (empty($user['usergroupid']))
{
$user['usergroupid'] = 2; // sanity check
} to
if ($userinfo['coppauser'] OR ($vboptions['moderatenewmembers'] AND !$userinfo['posts']))
{
// put user in moderated group
$user['usergroupid'] = 4;
}
if (empty($user['usergroupid']))
{
$user['usergroupid'] = 2; // sanity check
}
if ($userfield['field11']=='Arch') // change this to suit you
{
$user['usergroupid'] = 17; // change this to suit you.
} Where 'Arch' is the choice from a selection drop-down from custom field 11 and 17 is the group I want them to join.
I actually want to have 3 choices (groups). Am I on the right track here?
I need to change a user's primary usergroup based on their own selection from a menu "Please choose usergroup A, B or C"
I would like this to be done at registration via a custom profile field. I don't know how this would be done as I am also using email verification which dumps everyone into the same Registered User group. Any ideas?
Basically I just need users to select their own primary usergroup without my intervention, if not at registration, then somewhere. I'm really struggling with this. Any help or ideas are most appreciated.
Here is what I tried from another thread. In register.php changed
if ($userinfo['coppauser'] OR ($vboptions['moderatenewmembers'] AND !$userinfo['posts']))
{
// put user in moderated group
$user['usergroupid'] = 4;
}
if (empty($user['usergroupid']))
{
$user['usergroupid'] = 2; // sanity check
} to
if ($userinfo['coppauser'] OR ($vboptions['moderatenewmembers'] AND !$userinfo['posts']))
{
// put user in moderated group
$user['usergroupid'] = 4;
}
if (empty($user['usergroupid']))
{
$user['usergroupid'] = 2; // sanity check
}
if ($userfield['field11']=='Arch') // change this to suit you
{
$user['usergroupid'] = 17; // change this to suit you.
} Where 'Arch' is the choice from a selection drop-down from custom field 11 and 17 is the group I want them to join.
I actually want to have 3 choices (groups). Am I on the right track here?