diff --git a/src/Eccube/EventListener/RateLimiterListener.php b/src/Eccube/EventListener/RateLimiterListener.php index 3d50eeee7eb..e932de1952f 100644 --- a/src/Eccube/EventListener/RateLimiterListener.php +++ b/src/Eccube/EventListener/RateLimiterListener.php @@ -80,13 +80,7 @@ public function onController(ControllerEvent $event) $factory = $this->locator->get($limiterId); if (in_array('customer', $config['type']) || in_array('user', $config['type'])) { $User = $this->requestContext->getCurrentUser(); - if ($User instanceof Customer) { - $limiter = $factory->create($User->getId()); - if (!$limiter->consume()->isAccepted()) { - throw new TooManyRequestsHttpException(); - } - } - if ($User instanceof Member) { + if ($User instanceof Customer || $User instanceof Member) { $limiter = $factory->create($User->getId()); if (!$limiter->consume()->isAccepted()) { throw new TooManyRequestsHttpException();