mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/13234-2] Correctly verify that user_id is set in user data array
PHPBB3-13234-2
This commit is contained in:
parent
3472b6c5bc
commit
087a5363bb
1 changed files with 2 additions and 2 deletions
|
@ -605,7 +605,7 @@ class session
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
$user_data = $db->sql_fetchrow($result);
|
$user_data = $db->sql_fetchrow($result);
|
||||||
|
|
||||||
if ($user_id === false || $user_id == $user_data['user_id'])
|
if ($user_id === false || (isset($user_data['user_id']) && $user_id == $user_data['user_id']))
|
||||||
{
|
{
|
||||||
$this->data = $user_data;
|
$this->data = $user_data;
|
||||||
$bot = false;
|
$bot = false;
|
||||||
|
@ -935,7 +935,7 @@ class session
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset the data array
|
// Reset the data array
|
||||||
$this->data = false;
|
$this->data = array();
|
||||||
|
|
||||||
$sql = 'SELECT *
|
$sql = 'SELECT *
|
||||||
FROM ' . USERS_TABLE . '
|
FROM ' . USERS_TABLE . '
|
||||||
|
|
Loading…
Add table
Reference in a new issue