monster.util.isAdmin()

Syntax

monster.util.isAdmin([user]);

Parameters

  • user (optional)

Type: Object User with the same format as an account returned by a GET on the /users/{userid} API.

Return

This method returns a Boolean.

Description

This method checks if a user is currently logged in as an admin user.

Examples

if(monster.util.isAdmin()) { 
    // do something if user is an admin
};

Edit this page here