Fix whitescreen on recoverpassword with unknown user

This commit is contained in:
Michele macno Azzolari 2011-12-02 15:47:35 -05:00 committed by Evan Prodromou
parent 5365ffc7d0
commit d1fae16c70
2 changed files with 3 additions and 2 deletions

View File

@ -288,10 +288,11 @@ class RecoverpasswordAction extends Action
'have been sent to the email address registered to your ' . 'have been sent to the email address registered to your ' .
'account.'); 'account.');
$this->success = true; $this->success = true;
$this->showPage();
} catch (Exception $e) { } catch (Exception $e) {
$this->success = false; $this->success = false;
$this->msg = $e->getMessage();
} }
$this->showPage();
} }
function resetPassword() function resetPassword()

View File

@ -1086,7 +1086,7 @@ class User extends Managed_DataObject
if (!$user) { if (!$user) {
// TRANS: Information on password recovery form if no known username or e-mail address was specified. // TRANS: Information on password recovery form if no known username or e-mail address was specified.
throw new ClientError(_('No user with that email address or username.')); throw new ClientException(_('No user with that email address or username.'));
return; return;
} }