mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 03:54:10 +01:00
Prevents an occasional error where the $this->data['session_time'] is undefined.
git-svn-id: file:///svn/phpbb/trunk@5428 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
d864074bdd
commit
bfa6f1d18a
@ -382,16 +382,21 @@ class session
|
||||
global $SID, $db, $config;
|
||||
|
||||
$sql = 'DELETE FROM ' . SESSIONS_TABLE . "
|
||||
WHERE session_id = '" . $db->sql_escape($this->session_id) . "'
|
||||
WHERE session_id = '" . $db->sql_escape($this->session_id) . "'
|
||||
AND session_user_id = " . (int) $this->data['user_id'];
|
||||
$db->sql_query($sql);
|
||||
|
||||
if ($this->data['user_id'] != ANONYMOUS)
|
||||
{
|
||||
// Delete existing session, update last visit info first!
|
||||
if ( !isset($this->data['session_time']) )
|
||||
{
|
||||
$this->data['session_time'] = time();
|
||||
}
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET user_lastvisit = ' . (int) $this->data['session_time'] . '
|
||||
WHERE user_id = ' . (int) $this->data['user_id'];
|
||||
SET user_lastvisit = ' . (int) $this->data['session_time'] . '
|
||||
WHERE user_id = ' . (int) $this->data['user_id'];
|
||||
$db->sql_query($sql);
|
||||
|
||||
if ($this->cookie_data['k'])
|
||||
|
Loading…
x
Reference in New Issue
Block a user