1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-19 06:51:33 +02:00

[ticket/16470] remove unneeded migration, adjust code

PHPBB3-16470
This commit is contained in:
rxu
2023-11-01 21:03:07 +07:00
parent 7ba5f8f22a
commit 9e130333c0
2 changed files with 6 additions and 109 deletions

View File

@@ -1799,23 +1799,17 @@ class session
/**
* Update user last visit time
*
* @return bool
*/
public function update_user_lastvisit(): bool
public function update_user_lastvisit()
{
global $db;
if (!isset($this->data['session_time'], $this->data['user_id']))
if (isset($this->data['session_time'], $this->data['user_id']))
{
return false;
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_lastvisit = ' . (int) $this->data['session_time'] . '
WHERE user_id = ' . (int) $this->data['user_id'];
$db->sql_query($sql);
}
$sql = 'UPDATE ' . USERS_TABLE . '
SET user_lastvisit = ' . (int) $this->data['session_time'] . '
WHERE user_id = ' . (int) $this->data['user_id'];
$db->sql_query($sql);
return (bool) $db->sql_affectedrows();
}
}