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 {