src/Auth.php
public function hasRole($role) {
		if (empty($role) || !\is_numeric($role)) {
			return false;
		}

		if (isset($_SESSION) && isset($_SESSION[self::SESSION_FIELD_ROLES])) {
			$role = (int) $role;

			return (((int) $_SESSION[self::SESSION_FIELD_ROLES]) & $role) === $role;
		}
		else {
			return false;
		}
	}
public function hasRole($role) {
		if (empty($role) || !\is_numeric($role)) {
			return false;
		}

		if (isset($_SESSION) && isset($_SESSION[self::SESSION_FIELD_ROLES])) {
			$role = (int) $role;

			return (((int) $_SESSION[self::SESSION_FIELD_ROLES]) & $role) === $role;
		}
		else {
			return false;
		}
	}
public function hasRole ( $ role ) { if ( empty ( $ role ) || ! \ is_numeric ( $ role ) ) { return false ; } if ( isset ( $ _SESSION ) && isset ( $ _SESSION [ self :: SESSION_FIELD_ROLES ] ) ) { $ role = ( int ) $ role ; return ( ( ( int ) $ _SESSION [ self :: SESSION_FIELD_ROLES ] ) & $ role ) === $ role ; } else { return false ; } }
Returns whether the currently signed-in user has the specified role

@param int $role the role as one of the constants from the {@see Role} class
@return bool

@see Role
Returns whether the currently signed - in user has the specified role