CC-3970: Password Reset: No UI error msg for no mail server founded

-done
This commit is contained in:
denise 2012-06-13 16:04:57 -04:00
parent 4077858c8e
commit f433fd89fe
3 changed files with 19 additions and 6 deletions

View file

@ -118,8 +118,12 @@ class LoginController extends Zend_Controller_Action
if (!empty($user)) {
$auth = new Application_Model_Auth();
$auth->sendPasswordRestoreLink($user, $this->view);
$this->_helper->redirector('password-restore-after', 'login');
$success = $auth->sendPasswordRestoreLink($user, $this->view);
if ($success) {
$this->_helper->redirector('password-restore-after', 'login');
} else {
$form->email->addError($this->view->translate("Email could not be sent. Check your mail server settings and ensure it has been configured properly."));
}
}
else {
$form->email->addError($this->view->translate("Given email not found."));