PDA

View Full Version : check usergroups


benbramz
11-23-2005, 04:02 PM
im using the session from VBulletin on another page, and want to check if the user is a member of more then one usergroup.

Intsead of going:

if(($vbulletin->userinfo['usergroupid']==1)||($vbulletin->userinfo['usergroupid']==2)||($vbulletin->userinfo['usergroupid']==3));

is there somthing that is a little less bulky?

thanks :squareeyed:

Marco van Herwaarden
11-23-2005, 04:05 PM
You can use the is_member_of() function.

benbramz
11-24-2005, 12:26 AM
so just show me so im sure on this please:

how do i convert this?

if(($vbulletin->userinfo['usergroupid']==1)||($vbulletin->userinfo['usergroupid']==2)||($vbulletin->userinfo['usergroupid']==3));

thanks