I registered a test account and chose the option "male" as directed in the in instructions, but it stayed in the same group
I uploaded this XML:
Quote:
<?xml version="1.0" encoding="ISO-8859-1"?>
<plugins>
<plugin active="1" product="vbulletin">
<title>Put User In User Group Based on Field Value</title>
<hookname>register_activate_process</hookname>
<phpcode><![CDATA[// Get the value for field 5
$user = $db->query_first("
SELECT field5
FROM " . TABLE_PREFIX . "userfield
WHERE userid = " . $vbulletin->userinfo['userid'] . "
");
if ($user['field5'] == 'male')
{
$userdata->set('usergroupid', 12);
}]]></phpcode>
</plugin>
</plugins>