Skip to content

Commit

Permalink
Remove check for valid subscriber in SubsriberValidator.
Browse files Browse the repository at this point in the history
This is double checked as the following
EventSubscriptionAllowedValidator already checks for overbooking.
  • Loading branch information
Alexander Bigga committed Feb 27, 2021
1 parent 51504b9 commit cbcf3e0
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions Classes/Domain/Validator/SubscriberValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')) {
Expand Down

0 comments on commit cbcf3e0

Please sign in to comment.