it should be hooked correctly in my forums "using 3.6.2" but it doesn't seem to work
here is my code, please let me know if something is wrong: "i use field5 by the way"
Code:
if ($user['field5'] == 'Egypt')
{
$userdata->set('usergroupid', 14);
}
if ($user['field5'] == 'Canada')
{
$userdata->set('usergroupid', 18);
}
if ($user['field5'] == 'Saudi Arabia')
{
$userdata->set('usergroupid', 15);
}
if ($user['field5'] == 'United Arab Emirates')
{
$userdata->set('usergroupid', 16);
}
if ($user['field5'] == 'United Kingdom')
{
$userdata->set('usergroupid', 17);
}
if ($user['field5'] == 'United States')
{
$userdata->set('usergroupid', 10);
}
if ($user['field5'] == 'Other')
{
$userdata->set('usergroupid', 19);
}
checked usergroupid matching
checked field matching
checked case sensitivity
is there anything else to check?!
note:
my field type is single selection menu, should i change it into radio buttons?
note:
here how the code is appearing in the plugins manager section:
Code:
// Get the value for field 5
$user = $db->query_first("
SELECT field5
FROM " . TABLE_PREFIX . "userfield
WHERE userid = " . $vbulletin->userinfo['userid'] . "
");
if ($user['field5'] == 'Egypt')
{
$userdata->set('usergroupid', 14);
}
if ($user['field5'] == 'Canada')
{
$userdata->set('usergroupid', 18);
}
if ($user['field5'] == 'Saudi Arabia')
{
$userdata->set('usergroupid', 15);
}
if ($user['field5'] == 'United Arab Emirates')
{
$userdata->set('usergroupid', 16);
}
if ($user['field5'] == 'United Kingdom')
{
$userdata->set('usergroupid', 17);
}
if ($user['field5'] == 'United States')
{
$userdata->set('usergroupid', 10);
}
if ($user['field5'] == 'Other')
{
$userdata->set('usergroupid', 19);
}