From bbe2b213108f94121e05008fff23ed9ed3424e9d Mon Sep 17 00:00:00 2001 From: rxu Date: Sun, 18 Jun 2023 23:56:44 +0700 Subject: [PATCH] [ticket/16470] Correctly handle user last visit update on session create PHPBB3-16470 PHPBB3-14173 --- phpBB/phpbb/session.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/phpBB/phpbb/session.php b/phpBB/phpbb/session.php index 2b98b34ee2..e1f54f42f5 100644 --- a/phpBB/phpbb/session.php +++ b/phpBB/phpbb/session.php @@ -827,16 +827,13 @@ class session { $this->data['session_time'] = $this->data['session_last_visit'] = $this->time_now; - // Update the last visit time - $sql = 'UPDATE ' . USERS_TABLE . ' - SET user_lastvisit = ' . (int) $this->data['session_time'] . ' - WHERE user_id = ' . (int) $this->data['user_id']; - $db->sql_query($sql); - $SID = '?sid='; $_SID = ''; } + // Update the last visit time + $this->update_user_lastvisit(); + $session_data = $sql_ary; /** * Event to send new session data to extension