Merge branch 'ticket/13138-2' into ticket/13138-asc

Conflicts:
	phpBB/phpbb/session.php
This commit is contained in:
Joas Schilling 2014-10-16 12:39:39 +02:00
commit 55b97ffc27

View file

@ -577,6 +577,22 @@ class session
} }
} }
if ($user_id !== false && !sizeof($this->data))
{
$this->cookie_data['k'] = '';
$this->cookie_data['u'] = $user_id;
$sql = 'SELECT *
FROM ' . USERS_TABLE . '
WHERE user_id = ' . (int) $this->cookie_data['u'] . '
AND user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')';
$result = $db->sql_query($sql);
$this->data = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$bot = false;
}
else if (!$bot)
{
$provider_collection = $phpbb_container->get('auth.provider_collection'); $provider_collection = $phpbb_container->get('auth.provider_collection');
$provider = $provider_collection->get_provider(); $provider = $provider_collection->get_provider();
$this->data = $provider->autologin(); $this->data = $provider->autologin();
@ -602,19 +618,6 @@ class session
$db->sql_freeresult($result); $db->sql_freeresult($result);
$bot = false; $bot = false;
} }
else if ($user_id !== false && !sizeof($this->data))
{
$this->cookie_data['k'] = '';
$this->cookie_data['u'] = $user_id;
$sql = 'SELECT *
FROM ' . USERS_TABLE . '
WHERE user_id = ' . (int) $this->cookie_data['u'] . '
AND user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')';
$result = $db->sql_query($sql);
$this->data = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$bot = false;
} }
// Bot user, if they have a SID in the Request URI we need to get rid of it // Bot user, if they have a SID in the Request URI we need to get rid of it