Documentation
IPS_IsAdministrator
bool IPS_IsAdministrator ()
Returns
If the currently logged in user is an administrator, TRUE is returned, otherwise FALSE.
Description
The function checks whether the user in whose context the current execution runs (see IPS_GetLoggedInUser) is an administrator. Administrators are the @admin user and every user that has been assigned the @admin role. For the @unknown user the function always returns FALSE.
Administrator permissions are required e.g. for all functions that modify users and roles. The function does not require the RBAC feature in the license.
To check an arbitrary user, IPS_UserIsAdministrator can be used.
Example
if (IPS_IsAdministrator()) {
echo 'The script runs with administrator permissions';
}