public function forgotAction()
 {
     if ($this->zfcUserAuthentication()->hasIdentity()) {
         return $this->redirect()->toRoute('zfcuser');
     }
     $this->passwordService->cleanExpiredForgotRequests();
     $redirectUrl = $this->url()->fromRoute('zfcuser/forgotpassword');
     $prg = $this->prg($redirectUrl, true);
     $form = $this->getForgotForm();
     if ($prg instanceof \Zend\Http\PhpEnvironment\Response) {
         // returned a response to redirect us
         return $prg;
     } elseif ($prg === false) {
         // this wasn't a POST request, but there were no params in the flash messenger
         // probably this is the first time the form was loaded
         // Render the form
         return array('forgotForm' => $form);
     }
     $form->setData($prg);
     if ($form->isValid()) {
         $email = $form->get('email')->getValue();
         $user = $this->userService->getUserMapper()->findByEmail($email);
         //only send request when email is found
         if ($user != null) {
             $this->passwordService->sendProcessForgotRequest($user->getId(), $email);
         }
         $vm = new ViewModel(array('email' => $email));
         $vm->setTemplate('goalio-forgot-password/forgot/sent');
         return $vm;
     } else {
         return array('forgotForm' => $form);
     }
 }