From b36bf5d2f8d0ce1c9d58e0085c233a48bd0bc390 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Mon, 15 Oct 2018 13:28:38 +0800 Subject: [PATCH] DataObjects/Core_person.php --- DataObjects/Core_person.php | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) 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"); -- 2.39.2