From 829e1475044f1a72f68958923a0900ed4e62f78e Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Wed, 7 Dec 2016 17:55:57 +0100 Subject: [PATCH] [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 --- phpBB/phpbb/install/installer.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/phpBB/phpbb/install/installer.php b/phpBB/phpbb/install/installer.php index a7d3b99dcb..e04e233a76 100644 --- a/phpBB/phpbb/install/installer.php +++ b/phpBB/phpbb/install/installer.php @@ -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);