Bitrix Site Manager

CUser::IsAdmin

bool
CUser::IsAdmin()

The method IsAdmin checks if the current authorized user belongs to the Administrators group (usually called from the $USER object). Returns true if the user is of the Administrators group, or false otherwise.

Parameters

No parameters.

See Also

Example



<?
global $USER;
if ($USER->IsAdmin()) echo "You are the Administrator!";
?>