mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
Merge branch 'ticket/13138-2' into ticket/13138-asc
Conflicts: phpBB/phpbb/session.php
This commit is contained in:
commit
55b97ffc27
1 changed files with 29 additions and 26 deletions
|
@ -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 = $provider_collection->get_provider();
|
||||
$this->data = $provider->autologin();
|
||||
|
@ -602,19 +618,6 @@ class session
|
|||
$db->sql_freeresult($result);
|
||||
$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
|
||||
|
|
Loading…
Add table
Reference in a new issue