Quote:
Originally Posted by Floris
Your example code:
PHP Code:
if ($vbulletin->userinfo['usergroupid'] == '9'
or $vbulletin->userinfo['usergroupid'] == '6'
)
In case a site has 14 or 51 usergroups they want to control, I think it might be an idea to use the array and check against it?
untested:
PHP Code:
if (in_array($vbulletin->userinfo['usergroupid'], '9', '6', '12', 'etc'))
|
If you want to allow a number of groups that would probably be a better way of doing it.
Ive only ever used it to allow extra stuff for Admins and Mods so I never really had a need to optimise it for a large number of groups.