Log in

View Full Version : check secondary usergroup in php file


h2ojunkie
07-12-2007, 12:14 AM
If I use this statement to check the primary usergroup:
if (in_array($vbulletin->userinfo['usergroupid'], array (30,31)))

what do I use to check if they are a member of a secondary usergroup?

thanks

Nevermind, I found it

if (in_array($vbulletin->userinfo[membergroupids], array (30,31)))

HMBeaty
07-12-2007, 01:39 AM
Actually I believe it should be

if (in_array($vbulletin->userinfo['membergroupids'], array (30,31)))

With the quotations around membergroupids. Correct me if I am wrong

Dismounted
07-12-2007, 04:41 AM
if (is_member_of($vbulletin->userinfo, 4, 5, 6))
That would check both :). You can overload the function for more usergroups.