[ticket/13234-2] Correctly verify that user_id is set in user data array

PHPBB3-13234-2
This commit is contained in:
Nils Adermann 2014-10-27 23:56:20 -07:00
parent 3472b6c5bc
commit 087a5363bb

View file

@ -605,7 +605,7 @@ class session
$result = $db->sql_query($sql);
$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;
$bot = false;
@ -935,7 +935,7 @@ class session
}
// Reset the data array
$this->data = false;
$this->data = array();
$sql = 'SELECT *
FROM ' . USERS_TABLE . '