From e413c7f8fba2e3622cbde619192227a2fabbaebc Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 30 Oct 2023 23:13:44 +0100 Subject: [PATCH] undebug --- web/inc/classes/Model.class.php | 4 ++-- web/models/User.model.php | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/web/inc/classes/Model.class.php b/web/inc/classes/Model.class.php index 28370e4..d432120 100644 --- a/web/inc/classes/Model.class.php +++ b/web/inc/classes/Model.class.php @@ -126,7 +126,7 @@ class Model { { $value = $GLOBALS['redis']->hget($this->dbTable.':'.$this->id,$key); - var_dump("BEFORE[".$this->dbTable.':'.$this->id."] Loading from DB $key: '$value'"); + //var_dump("BEFORE[".$this->dbTable.':'.$this->id."] Loading from DB $key: '$value'"); if($value!==NULL) //we'll leave null values alone switch($this->dbFields[$key]['type']) @@ -142,7 +142,7 @@ class Model { $value = json_decode($value,true); break; } - var_dump("AFTER[".$this->dbTable.':'.$this->id."] Loading from DB $key: '$value'"); + //var_dump("AFTER[".$this->dbTable.':'.$this->id."] Loading from DB $key: '$value'"); $this->data[$key] = $value; } diff --git a/web/models/User.model.php b/web/models/User.model.php index 388164c..59e0416 100644 --- a/web/models/User.model.php +++ b/web/models/User.model.php @@ -26,10 +26,11 @@ class User extends Model { if(!$this->id) return false; $this->load(); $this->last_login = $this->getDateTime(); - $this->save(); $_SESSION['user'] = $this; $_SESSION['userid'] = $this->id; + + $_SESSION['user']->save(); } function logout()