From 1a6cb3ba42788e4150fc7a0e3e4e5ddeb07517e4 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Tue, 10 Oct 2023 16:12:09 +0200 Subject: [PATCH] Fix: throwing exception in password recovery --- src/Controller/AccountController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Controller/AccountController.php b/src/Controller/AccountController.php index 7367202f..23c8878d 100644 --- a/src/Controller/AccountController.php +++ b/src/Controller/AccountController.php @@ -303,10 +303,10 @@ public function sendPasswordRecoveryMailAction(Request $request, PasswordRecover { if ($request->isMethod(Request::METHOD_POST)) { try { - $customer = $service->sendRecoveryMail($request->get('email', ''), $this->document->getProperty('password_reset_mail')); - if (!$customer instanceof CustomerInterface) { - throw new \Exception('Invalid Customer'); - } + $service->sendRecoveryMail( + $request->get('email', ''), + $this->document->getProperty('password_reset_mail') + ); $this->addFlash('success', $translator->trans('account.reset-mail-sent-when-possible')); } catch (\Exception $e) {