PDA

View Full Version : supermods and can_moderate()


nnStaff
05-23-2009, 05:01 PM
if a user is a super moderator, do they by default have every permission that can_moderate will check for?

I have some code that is checking various can_moderate properties. For simplicity though, I would like to have a catch-all that basically sets my moderator variables all to true if they're a super moderator. If they're not, it can then go check individual permissions. But I want to make sure that a super moderator inherently has all can_moderate() abilities before I do this.

--------------- Added 1243101773 at 1243101773 ---------------

in addition, what's the easiest way to check and see if a user is a super mod (or higher)

Dismounted
05-24-2009, 10:56 AM
if a user is a super moderator, do they by default have every permission that can_moderate will check for?
AFAIK, yes.

nnStaff
05-24-2009, 08:15 PM
is there a quick way to check if a user is a super moderator via vb API?

Dismounted
05-25-2009, 05:47 AM
if ($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['ismoderator'])
{
// user is super moderator
}