]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fix whitescreen on recoverpassword with unknown user
authorMichele macno Azzolari <macno@macno.org>
Fri, 2 Dec 2011 20:47:35 +0000 (15:47 -0500)
committerEvan Prodromou <evan@status.net>
Fri, 2 Dec 2011 20:48:29 +0000 (15:48 -0500)
actions/recoverpassword.php
classes/User.php

index d81c13b0059456e39df36c4312102381a00f4494..d8f95b24c3e4f189082c9d82771607f043aa22c7 100644 (file)
@@ -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()
index 65bc0485bf1b4070862ac6929df2c1a0b8c7b35d..726a7e5c30d7954b52449e69fbebe6148d98f18c 100644 (file)
@@ -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;
         }