1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-23 17:10:53 +01:00

[ticket/14896] Do not overwrite login when finishing install

Otherwise the user will be "logged in" again as guest user which will
prevent any redirectiong to the ACP after the installation.

PHPBB3-14896
This commit is contained in:
Marc Alexander 2016-12-07 17:55:57 +01:00
parent 129bfd5e62
commit 829e147504
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995

View File

@ -243,12 +243,18 @@ class installer
}
else
{
// Start session and try to apply session id
$auth = $this->container_factory->get('auth');
// Start session if not installing and get user object
// to allow redirecting to ACP
$user = $this->container_factory->get('user');
$user->session_begin();
$auth->acl($user->data);
$user->setup();
if (!isset($module) || !($module instanceof \phpbb\install\module\install_finish\module))
{
$auth = $this->container_factory->get('auth');
$user->session_begin();
$auth->acl($user->data);
$user->setup();
}
$phpbb_root_path = $this->container_factory->get_parameter('core.root_path');
$acp_url = append_sid($phpbb_root_path . 'adm/index.php', 'i=acp_help_phpbb&mode=help_phpbb', true, $user->session_id);