mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-01 14:30:32 +02:00
Merge pull request #6642 from rxu/ticket/17338
[ticket/17338] Prefer user_last_active to display user last activity info
This commit is contained in:
@@ -441,7 +441,7 @@ class session
|
||||
$this->check_ban_for_current_session($config);
|
||||
|
||||
// Update user last active time accordingly, but in a minute or so
|
||||
if ((int) $this->data['session_time'] - (int) $this->data['user_last_active'] > 60)
|
||||
if ($this->time_now - (int) $this->data['user_last_active'] > 60)
|
||||
{
|
||||
$this->update_last_active_time();
|
||||
}
|
||||
@@ -1812,7 +1812,7 @@ class session
|
||||
{
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET user_lastvisit = ' . (int) $this->data['session_time'] . ',
|
||||
user_last_active = ' . (int) $this->data['session_time'] . '
|
||||
user_last_active = ' . $this->time_now . '
|
||||
WHERE user_id = ' . (int) $this->data['user_id'];
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
@@ -1827,10 +1827,10 @@ class session
|
||||
{
|
||||
global $db;
|
||||
|
||||
if (isset($this->data['session_time'], $this->data['user_id']))
|
||||
if (isset($this->time_now, $this->data['user_id']))
|
||||
{
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET user_last_active = ' . (int) $this->data['session_time'] . '
|
||||
SET user_last_active = ' . $this->time_now . '
|
||||
WHERE user_id = ' . (int) $this->data['user_id'];
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
Reference in New Issue
Block a user