src/Pyrite/ACL.php
public static function hasRole($role)
    {
        if (!isset($_SESSION['user'])) {
            return false;
        };
        if (!isset($_SESSION['ACL_ROLES'])) {
            return false;
        };
        return in_array($role, $_SESSION['ACL_ROLES']);
    }
public static function hasRole($role)
    {
        if (!isset($_SESSION['user'])) {
            return false;
        };
        if (!isset($_SESSION['ACL_ROLES'])) {
            return false;
        };
        return in_array($role, $_SESSION['ACL_ROLES']);
    }
public static function hasRole ( $ role ) { if ( ! isset ( $ _SESSION [ 'user' ] ) ) { return false ; } ; if ( ! isset ( $ _SESSION [ 'ACL_ROLES' ] ) ) { return false ; } ; return in_array ( $ role , $ _SESSION [ 'ACL_ROLES' ] ) ; }
Tests whether current user is a member of specified role

@param string $role Role to test

@return bool Whether the user has that role
Tests whether current user is a member of specified role