From ad2fd9abd43e55e53efa43e781e2877d3e7eec24 Mon Sep 17 00:00:00 2001 From: Michele macno Azzolari Date: Fri, 2 Dec 2011 15:47:35 -0500 Subject: [PATCH] Fix whitescreen on recoverpassword with unknown user --- actions/recoverpassword.php | 3 ++- classes/User.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/actions/recoverpassword.php b/actions/recoverpassword.php index d81c13b005..d8f95b24c3 100644 --- a/actions/recoverpassword.php +++ b/actions/recoverpassword.php @@ -288,10 +288,11 @@ class RecoverpasswordAction extends Action 'have been sent to the email address registered to your ' . 'account.'); $this->success = true; - $this->showPage(); } catch (Exception $e) { $this->success = false; + $this->msg = $e->getMessage(); } + $this->showPage(); } function resetPassword() diff --git a/classes/User.php b/classes/User.php index 65bc0485bf..726a7e5c30 100644 --- a/classes/User.php +++ b/classes/User.php @@ -1086,7 +1086,7 @@ class User extends Managed_DataObject if (!$user) { // 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; }