]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/recoverpassword.php
OAuth related syntax fixes, nothing big
[quix0rs-gnu-social.git] / actions / recoverpassword.php
index 8d731cb871cb3fbe9d11f2e0ca8334ef25aca19b..1565ac9bf34e6999c840e0a7d9c1655cdf9fa45c 100644 (file)
@@ -57,7 +57,7 @@ class RecoverpasswordAction extends Action
     function checkCode()
     {
         $code = $this->trimmed('code');
-        $confirm = Confirm_address::staticGet('code', $code);
+        $confirm = Confirm_address::getKV('code', $code);
 
         if (!$confirm) {
             // TRANS: Client error displayed when password recovery code is not correct.
@@ -70,7 +70,7 @@ class RecoverpasswordAction extends Action
             return;
         }
 
-        $user = User::staticGet($confirm->user_id);
+        $user = User::getKV($confirm->user_id);
 
         if (!$user) {
             // TRANS: Server error displayed trying to recover password without providing a user.
@@ -137,7 +137,7 @@ class RecoverpasswordAction extends Action
         common_ensure_session();
         $user_id = $_SESSION['tempuser'];
         if ($user_id) {
-            $user = User::staticGet($user_id);
+            $user = User::getKV($user_id);
         }
         return $user;
     }
@@ -260,7 +260,7 @@ class RecoverpasswordAction extends Action
         $this->elementStart('li');
          // TRANS: Field label for password reset form where the password has to be typed again.
         $this->password('confirm', _('Confirm'),
-                        // TRANS: Ttile for field label for password reset form where the password has to be typed again.
+                        // TRANS: Title for field label for password reset form where the password has to be typed again.
                         _('Same as password above.'));
         $this->elementEnd('li');
         $this->elementEnd('ul');
@@ -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()