mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
- fixed bug #44975
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10103 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
186abf0798
commit
295fb5373a
1 changed files with 14 additions and 0 deletions
|
@ -1361,6 +1361,20 @@ class session
|
||||||
WHERE user_id = ' . (int) $user_id;
|
WHERE user_id = ' . (int) $user_id;
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
|
|
||||||
|
// Update last visit info first before deleting sessions
|
||||||
|
$sql = 'SELECT session_time, session_page
|
||||||
|
FROM ' . SESSIONS_TABLE . '
|
||||||
|
WHERE session_user_id = ' . (int) $user_id . '
|
||||||
|
ORDER BY session_time DESC';
|
||||||
|
$result = $db->sql_query_limit($sql, 1);
|
||||||
|
$row = $db->sql_fetchrow($result);
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
|
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||||
|
SET user_lastvisit = ' . (int) $row['session_time'] . ", user_lastpage = '" . $db->sql_escape($row['session_page']) . "'
|
||||||
|
WHERE user_id = " . (int) $user_id;
|
||||||
|
$db->sql_query($sql);
|
||||||
|
|
||||||
// Let's also clear any current sessions for the specified user_id
|
// Let's also clear any current sessions for the specified user_id
|
||||||
// If it's the current user then we'll leave this session intact
|
// If it's the current user then we'll leave this session intact
|
||||||
$sql_where = 'session_user_id = ' . (int) $user_id;
|
$sql_where = 'session_user_id = ' . (int) $user_id;
|
||||||
|
|
Loading…
Add table
Reference in a new issue