From: Alan Knowles Date: Mon, 15 Oct 2018 05:28:38 +0000 (+0800) Subject: DataObjects/Core_person.php X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=b36bf5d2f8d0ce1c9d58e0085c233a48bd0bc390 DataObjects/Core_person.php --- diff --git a/DataObjects/Core_person.php b/DataObjects/Core_person.php index 471a180c..85de3f70 100644 --- a/DataObjects/Core_person.php +++ b/DataObjects/Core_person.php @@ -275,21 +275,6 @@ class Pman_Core_DataObjects_Core_person extends DB_DataObject unset($_SESSION[get_class($this)][$sesPrefix .'-timeout']); setcookie('Pman.timeout', -1, time() + (30*60), '/'); return false; - - - if (!empty($_SESSION[get_class($this)][$sesPrefix .'-auth'])) { - // in session... - $a = unserialize($_SESSION[get_class($this)][$sesPrefix .'-auth']); - - $u = DB_DataObject::factory($this->tableName()); - if ($a->id && $u->get($a->id)) { //&& strlen($u->passwd)) { - - return $u->verifyAuth(); // got authentication... - - - } - - } // http basic auth.. @@ -303,7 +288,10 @@ class Pman_Core_DataObjects_Core_person extends DB_DataObject && $u->checkPassword($_SERVER['PHP_AUTH_PW']) ) { + // logged in via http auth + $_SESSION[get_class($this)][$sesPrefix .'-auth'] = serialize($u); + self::$authUser = $u; return true; } //die("test init");