protected function _isValidUserGroup($oUser)
    {
        $oVoucherSeries = $this->getSerie();
        $oUserGroups = $oVoucherSeries->setUserGroups();

        if (!$oUserGroups->count()) {
            return true;
        }

        if ($oUser) {
            foreach ($oUserGroups as $oGroup) {
                if ($oUser->inGroup($oGroup->getId())) {
                    return true;
                }
            }
        }

        $oEx = oxNew(\OxidEsales\Eshop\Core\Exception\VoucherException::class);
        $oEx->setMessage('ERROR_MESSAGE_VOUCHER_NOTVALIDUSERGROUP');
        $oEx->setVoucherNr($this->oxvouchers__oxvouchernr->value);
        throw $oEx;
    }