1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-10 01:25:33 +02:00

[ticket/16470] Correctly handle user last visit update on session create

PHPBB3-16470
PHPBB3-14173
This commit is contained in:
rxu 2023-06-18 23:56:44 +07:00
parent 9e55d3cb44
commit bbe2b21310
No known key found for this signature in database
GPG Key ID: 955F0567380E586A

View File

@ -827,16 +827,13 @@ class session
{ {
$this->data['session_time'] = $this->data['session_last_visit'] = $this->time_now; $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 = '?sid=';
$_SID = ''; $_SID = '';
} }
// Update the last visit time
$this->update_user_lastvisit();
$session_data = $sql_ary; $session_data = $sql_ary;
/** /**
* Event to send new session data to extension * Event to send new session data to extension