Pman/Login.php
[Pman.Base] / Pman / Login.php
index ed06d38..ebd7c1c 100644 (file)
@@ -462,13 +462,11 @@ class Pman_Login extends Pman
         
     }
     
-    
-    function resetPassword($id,$t, $key, $newpass )
+    function verifyResetPassword($id,$t, $key)
     {
-        
-        $au = $this->getAuthUser();
+       $au = $this->getAuthUser();
         if ($au) {
-            return "Already Logged in - no need to use Password Reset";
+            $this->jerr( "Already Logged in - no need to use Password Reset");
         }
         
         $u = DB_DataObject::factory('core_person');
@@ -486,6 +484,18 @@ class Pman_Login extends Pman
        if ($t < strtotime("NOW - 1 DAY")) {
             $this->jerr("Password reset link has expired");
         }
+       return $u;
+       
+       
+       
+    }
+    
+    
+    function resetPassword($id,$t, $key, $newpass )
+    {
+        
+        $u = $this->verifyResetPassword($id,$t,$k);
+       
        
         $uu = clone($u);
         $u->no_reset_sent = 0;