PDA

View Full Version : How move user to other group witch custom profile set


Ary Braga
12-16-2012, 01:32 PM
Well, I have a gender choose on registration.

Are there any mod that based on that choice, move the member to this picked group ?

Something like this.

if ($vbulletin->userinfo['fieldX'] == "Women")
{
$newusergroupid = W;
}
else
{
$newusergroupid = 2;
}

Anyone know?


In advanced, Thank you so much.

mokujin
12-16-2012, 02:14 PM
This is my plugin I use for my forum, hook register_addmember_process
// userfield[field5]

if ($vbulletin->GPC['userfield']['fieldX'] == 'Y')
{
unset($newusergroupid);
$newusergroupid = 9;
$userdata->set('usergroupid', $newusergroupid);

// set user title
$userdata->set_usertitle('', false, $vbulletin->usergroupcache["$newusergroupid"], false, false);
}