From 8ea96c22243e667bc31a2b27508b9a308a60db6a Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Thu, 18 Jul 2024 20:22:36 +0700 Subject: [PATCH] Update User.php --- src/Legacy/Common/User.php | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/Legacy/Common/User.php b/src/Legacy/Common/User.php index 0cb742890..cf71491c9 100644 --- a/src/Legacy/Common/User.php +++ b/src/Legacy/Common/User.php @@ -178,6 +178,7 @@ class User WHERE session_id = '$session_id' LIMIT 1 "); + // Update user_session_time } $this->set_session_cookies($this->data['user_id']); } else { @@ -340,10 +341,10 @@ class User /** * Initialize sessiondata stored in cookies * - * @param bool $update_lastvisit * @param bool $set_cookie + * @throws Exception */ - public function session_end(bool $update_lastvisit = false, bool $set_cookie = true) + public function session_end(bool $set_cookie = true): void { Sessions::cache_rm_userdata($this->data); DB()->query(" @@ -352,18 +353,6 @@ class User "); if (!IS_GUEST) { - if ($update_lastvisit) { - DB()->query(" - UPDATE " . BB_USERS . " SET - user_session_time = " . TIMENOW . ", - user_lastvisit = " . TIMENOW . ", - user_last_ip = '" . USER_IP . "', - user_reg_ip = IF(user_reg_ip = '', '" . USER_IP . "', user_reg_ip) - WHERE user_id = {$this->data['user_id']} - LIMIT 1 - "); - } - if (isset($_REQUEST['reset_autologin'])) { $this->create_autologin_id($this->data, false);