Already mentioned that in my post at the bottom:
Quote:
to prevent any other usergroups being moved other than the one I selected.
yadacodehere
|
I included a code to prevent that second in overriding it.
Part of the first code:
Code:
$dataman =& datamanager_init('User', $vbulletin, ERRTYPE_STANDARD);
$dataman->set_existing($vbulletin->userinfo);
if xxxxxx AND $vbulletin->userinfo['usergroupid'] == 13)
{
$dataman->set('usergroupid', 47);
$dataman->save();
}
Second code:
Code:
$dataman =& datamanager_init('User', $vbulletin, ERRTYPE_STANDARD);
$dataman->set_existing($vbulletin->userinfo);
if xxxx AND $vbulletin->userinfo['usergroupid'] == 13)
{
$dataman->set('usergroupid', 37);
$dataman->save();
}
As you can see, both has an IF check if the user is in usergroup 13, and the second code moves the user to that usergroup.. Now, unless I did something wrong with the coding here.. the second code should not override the first one at all. As I mentioned in my post above, separately they work as a charm. (one disabled, other enabled, and the other way around).