DataObjects/Core_person.php
authorAlan Knowles <alan@roojs.com>
Mon, 15 Oct 2018 05:30:28 +0000 (13:30 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 15 Oct 2018 05:30:28 +0000 (13:30 +0800)
DataObjects/Core_person.php

index 7581c61..afb90eb 100644 (file)
@@ -412,9 +412,10 @@ class Pman_Core_DataObjects_Core_person extends DB_DataObject
             $u = DB_DataObject::factory($this->tableName()); // allow extending this ...
             $u->autoJoin();
             if ($u->get($a->id)) { /// && strlen($u->passwd)) {  // should work out the pid .. really..
-                
-                $_SESSION[get_class($this)][$sesPrefix .'-auth-timeout'] = time() + (30*60); // eg. 30 minutes
-                setcookie('Pman.timeout', time() + (30*60), time() + (30*60), '/');
+                if (isset($_SESSION[get_class($this)][$sesPrefix .'-auth'])) {
+                    $_SESSION[get_class($this)][$sesPrefix .'-auth-timeout'] = time() + (30*60); // eg. 30 minutes
+                    setcookie('Pman.timeout', time() + (30*60), time() + (30*60), '/');
+                }
                 
                 $user = clone ($u);
                 return clone($user);