From cbcf3e0bd9198a613ea8482f3b1c2d451d2601fb Mon Sep 17 00:00:00 2001 From: Alexander Bigga Date: Sat, 27 Feb 2021 23:16:22 +0100 Subject: [PATCH] Remove check for valid subscriber in SubsriberValidator. This is double checked as the following EventSubscriptionAllowedValidator already checks for overbooking. --- Classes/Domain/Validator/SubscriberValidator.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Classes/Domain/Validator/SubscriberValidator.php b/Classes/Domain/Validator/SubscriberValidator.php index 8d0efde..c04d474 100755 --- a/Classes/Domain/Validator/SubscriberValidator.php +++ b/Classes/Domain/Validator/SubscriberValidator.php @@ -116,13 +116,6 @@ public function isValid($newSubscriber) ) { $this->addError('val_number', 1120); $this->isValid = false; - } else { - $event = $newSubscriber->getEvent(); - // limit reached already --> overbooked - if ($this->subscriberRepository->countAllByEvent($event) + $newSubscriber->getNumber() > $event->getMaxSubscriber()) { - $this->addError('val_number', 1130); - $this->isValid = false; - } } $currentSessionData = $this->getSessionData('editcode'); if ($newSubscriber->getEditcode() != $this->getSessionData('editcode')) {