monster.util.isAdmin()

Syntax

monster.util.isAdmin([user]);

Parameters

KeyDescriptionTypeDefaultRequired
userUser object with the same format as an account returned by a GET on the /users/{userid} API.Objectfalse

Return value

A Boolean indication whether or not the current or specified user is an admin.

Description

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

Example

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