PDA

View Full Version : Permission by Userid


Zaiaku
01-03-2008, 01:08 AM
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
01-03-2008, 02:53 AM
if (in_array($vbulletin->userinfo['userid'], array(1, 2, 3))
{
//Users 1, 2 ,3 get to see this code.
}

Zaiaku
01-03-2008, 03:03 AM
Much Thx. I hate when I forgot 1 thing.