From 47b112320cee814d623f7bfbccc36ea753fa7564 Mon Sep 17 00:00:00 2001 From: Anton Khabiuk Date: Thu, 15 Dec 2016 15:30:32 +0200 Subject: [PATCH] Update ForgotController.php --- src/GoalioForgotPassword/Controller/ForgotController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/GoalioForgotPassword/Controller/ForgotController.php b/src/GoalioForgotPassword/Controller/ForgotController.php index 52f3213..861d3bc 100644 --- a/src/GoalioForgotPassword/Controller/ForgotController.php +++ b/src/GoalioForgotPassword/Controller/ForgotController.php @@ -86,11 +86,13 @@ public function forgotAction() $user = $userService->getUserMapper()->findByEmail($email); //only send request when email is found + $success = false; if($user != null) { $service->sendProcessForgotRequest($user->getId(), $email); + $success = true; } - $vm = new ViewModel(array('email' => $email)); + $vm = new ViewModel(array('email' => $email, 'success' => $success)); $vm->setTemplate('goalio-forgot-password/forgot/sent'); return $vm; } else {