PDA

View Full Version : How to set vB usergroup permission in php file


itdevil
06-25-2007, 03:12 PM
I have this in vB PHP file, I am looking to modify it to work with specific usergroups.

if (!in_array($vbulletin->userinfo['userid'],
preg_split('#\s*,\s*#s', $vbulletin->config['SpecialUsers']['superadministrators'],
-1, PREG_SPLIT_NO_EMPTY)) )

What can i change/replace so it work with vBulletin usergroups "Administrator" and "Custom Group" Instead of just superadmins only.

any idea

Thank you!

Thanks figured it out myself.

if (!in_array($vbulletin->userinfo['usergroupid'], array(6, 60)))

Dismounted
06-26-2007, 07:38 AM
You should use this instead, it checks all usergroups, instead of just primary
is_member_of($vbulletin->userinfo, 6, 60)