Pman/Login.php
[Pman.Base] / Pman / Login.php
index a6ce5cd..93db793 100644 (file)
@@ -257,6 +257,21 @@ class Pman_Login extends Pman
             return $this->passwordRequest($_REQUEST['passwordRequest']);   
         }
         
+       if (!empty($_REQUEST['ResetPassword'])) {
+           if (empty($_REQUEST['id']) || 
+               empty($_REQUEST['ts']) ||
+               empty($_REQUEST['key']) ||
+               empty($_REQUEST['password1']) ||
+               empty($_REQUEST['password2']) ||
+               ($_REQUEST['password1'] != $_REQUEST['password2'])
+           ) {
+               $this->jerr("Invalid request to reset password");
+           }
+           
+           $this->resetPassword($_REQUEST['id'], $_REQUEST['ts'], $_REQUEST['key'], $_REQUEST['password1'] );
+       }
+       
+       // this is 'classic' change password...
         if (!empty($_REQUEST['changePassword'])) {
             return $this->changePassword($_REQUEST);
         }
@@ -435,7 +450,7 @@ class Pman_Login extends Pman
     }
     
     
-    function resetPassword($id,$t, $key)
+    function resetPassword($id,$t, $key, $newpass)
     {
         
         $au = $this->getAuthUser();