is_admin_user

is_admin_user says weather the currently logged in user is an admin user. Generally used for extra security checks just prior to performing critical admin-only operations.

Format:

is_admin_user()

Parameters:

This function does not take any parameters.

Returned Value:

Type Description
boolean TRUE if the user is logged in as the administrator, FALSE otherwise

Examples

 if (!is_admin_user()) {
     application.status = "approved"
 } 
 else {
     alert("You have to be the administrator to approve an application!")
 }