PDA

View Full Version : Permission by Userid


Zaiaku
03 Jan 2008, 03:08
I currently making a page on my forums that is only certain members can access it based on their userid. Can someone help me fix this listing for me.

($vbulletin->userinfo['userid'], 1,2,3)

What's the correct way to compare the browsing user to a list of userid's?

MoT3rror
03 Jan 2008, 04:53
if (in_array($vbulletin->userinfo['userid'], array(1, 2, 3))
{
//Users 1, 2 ,3 get to see this code.
}

Zaiaku
03 Jan 2008, 05:03
Much Thx. I hate when I forgot 1 thing.