Quote:
Originally Posted by blacklancer
awesome! thanks for your help.
if i want multiple user ids, do i seperate by comma??
Code:
if ($vbulletin->userinfo['userid'] != 1,2,3)
|
Code:
//use for miltiple individuals access
if (($vbulletin->userinfo['userid'] != X1) and ($vbulletin->userinfo['userid'] != X2))
{ print_no_permission();
exit();
}
the above allows you to add two users
if you wanted to add three users you would need to add another "and" + operand:
like:
Code:
if (($vbulletin->userinfo['userid'] != X1) and ($vbulletin->userinfo
['userid'] != X2) and ($vbulletin->userinfo['userid'] != X3))
if you were going to add more then three user ID's I would change the entire statement to:
Code:
if (!(in_array($vbulletin->userinfo['userid'], array(X,X1,X2,X3))))
{ print_no_permission();
exit();
}
replace X, X1, X2, X3 with the id number of the users you wish to allow edit accces