public static function userHasRole($role , $username = null)
	{
		if ( is_null( $username ) ) $username = self::getCurrentUsername();
		if ( is_null( $username ) ) return false;
		if ( ! self::userExists( $username ) ) return false;
		if ( in_array( 'admin' , self::$auth['users'][ $username ]['roles'] ) ) return true;
		return ( in_array( $role , self::$auth['users'][ $username ]['roles'] ) );
	}
public static function userHasRole($role , $username = null)
	{
		if ( is_null( $username ) ) $username = self::getCurrentUsername();
		if ( is_null( $username ) ) return false;
		if ( ! self::userExists( $username ) ) return false;
		if ( in_array( 'admin' , self::$auth['users'][ $username ]['roles'] ) ) return true;
		return ( in_array( $role , self::$auth['users'][ $username ]['roles'] ) );
	}
public static function userHasRole ( $ role , $ username = null ) { if ( is_null ( $ username ) ) $ username = self :: getCurrentUsername ( ) ; if ( is_null ( $ username ) ) return false ; if ( ! self :: userExists ( $ username ) ) return false ; if ( in_array ( 'admin' , self :: $ auth [ 'users' ] [ $ username ] [ 'roles' ] ) ) return true ; return ( in_array ( $ role , self :: $ auth [ 'users' ] [ $ username ] [ 'roles' ] ) ) ; }
Tell if a user has a role or not

@param string $username a username or current logged in user if not set

@return boolean
Tell if a user has a role or not