Model/PaymentValidator.php
protected function isUserAssignedToGroup($groups)
    {
        $isValid = false;

        $user = $this->getUser();
        foreach ($groups as $group) {
            if ($user->inGroup($group->getId())) {
                $isValid = true;
                break;
            }
        }

        return $isValid;
    }
protected function isUserAssignedToGroup($groups)
    {
        $isValid = false;

        $user = $this->getUser();
        foreach ($groups as $group) {
            if ($user->inGroup($group->getId())) {
                $isValid = true;
                break;
            }
        }

        return $isValid;
    }
protected function isUserAssignedToGroup ( $ groups ) { $ isValid = false ; $ user = $ this -> getUser ( ) ; foreach ( $ groups as $ group ) { if ( $ user -> inGroup ( $ group -> getId ( ) ) ) { $ isValid = true ; break ; } } return $ isValid ; }
Checks whether user is assigned to given groups array.

@param \OxidEsales\Eshop\Core\Model\ListModel $groups

@return bool
Checks whether user is assigned to given groups array .