Returns true if user is an admin (has access to the Admin Area in dynamic permissions), returns false otherwise.
Syntax
Security::isAdmin()
Arguments
No arguments.
Return value
Returns true if user is an admin, returns false otherwise.
Example
This example shows how to check if the current user is an admin.
if (Security::isAdmin()) {
echo "I'm an admin";
}
See also:
•Example: Hide controls on Add/Edit pages, based on the username