PDA

View Full Version : Deny usergroup access to a custom script


WorldCraft
09-24-2012, 11:10 PM
Hello, I'm trying to deny access to a custom script for certain usergroup/s.

Even though I am specifying specific usergroup ID's, all usergroups are being denied access.

require_once('./global.php');
if (!is_member_of($vbulletin->bbuserinfo, 19) OR !is_member_of($vbulletin->bbuserinfo, 20))
{
print_no_permission();
}

nerbert
09-24-2012, 11:44 PM
if(! (a OR b)) => if(!a AND !b)

Badshah93
09-25-2012, 03:06 AM
require_once('./global.php');
if (is_member_of($vbulletin->userinfo, array(19,20)))
{
print_no_permission();
}

// This will deny access for usergroups with ugpid 19 & 20