im using vb 3.-latest and i have a question about moving users to a usergroup based on profile filed answers. in previous version of vbulletin i swear this worked as a plugin with a hook of register_activate_process:
Code:
// Get the value for field
$user = $db->query_first("
SELECT field7
FROM " . TABLE_PREFIX . "userfield
WHERE userid = " . $vbulletin->userinfo['userid'] . "
");
// change user groups
if ($user['field7'] == 'yes')
{
$userdata->set('usergroupid', 23);
}
if ($user['field7'] == 'no')
{
$userdata->set('usergroupid', 24);
}
can somebody help me get this to work?