src/ViKon/Auth/Guard.php
public function hasRole($role)
    {
        if ($this->user() === null) {
            return null;
        }

        return in_array($role, $this->roles, true);
    }
public function hasRole($role)
    {
        if ($this->user() === null) {
            return null;
        }

        return in_array($role, $this->roles, true);
    }
public function hasRole ( $ role ) { if ( $ this -> user ( ) === null ) { return null ; } return in_array ( $ role , $ this -> roles , true ) ; }
Check if authenticate user has role

@param string $role

@return bool|null return NULL if user is not authenticated
Check if authenticate user has role