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

        if (!is_array($groups)) {
            $groups = func_get_args();
        }

        // Count roles because user need user to have all roles passed as parameter
        return count(array_intersect($groups, $this->groups)) === count($groups);
    }
public function hasGroups($groups)
    {
        if ($this->user() === null) {
            return null;
        }

        if (!is_array($groups)) {
            $groups = func_get_args();
        }

        // Count roles because user need user to have all roles passed as parameter
        return count(array_intersect($groups, $this->groups)) === count($groups);
    }
public function hasGroups ( $ groups ) { if ( $ this -> user ( ) === null ) { return null ; } if ( ! is_array ( $ groups ) ) { $ groups = func_get_args ( ) ; } // Count roles because user need user to have all roles passed as parameter return count ( array_intersect ( $ groups , $ this -> groups ) ) === count ( $ groups ) ; }
Check if authenticated user has all groups passed by parameter

@param string[] $groups

@return bool|null return NULL if user is not authenticated
Check if authenticated user has all groups passed by parameter