public function userHasGroup($groupName, DeterminableUserInterface $user)
    {
        $userHasGroup = false;
        if (true === in_array($groupName, $user->getGroups())) {
            $userHasGroup = true;
        }
        return $userHasGroup;
    }
public function userHasGroup($groupName, DeterminableUserInterface $user)
    {
        $userHasGroup = false;
        if (true === in_array($groupName, $user->getGroups())) {
            $userHasGroup = true;
        }
        return $userHasGroup;
    }
public function userHasGroup ( $ groupName , DeterminableUserInterface $ user ) { $ userHasGroup = false ; if ( true === in_array ( $ groupName , $ user -> getGroups ( ) ) ) { $ userHasGroup = true ; } return $ userHasGroup ; }
Checks if a user has the given group
@param string $groupName
@param DeterminableUserInterface $user
@return bool
Checks if a user has the given group