diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 7a978553bd..08567a99e7 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -4210,7 +4210,8 @@ function page_header($page_title = '', $display_online_list = false, $item_id = } else { - $u_login_logout = append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'); + $redirect = $request->variable('redirect', rawurlencode($user->page['page'])); + $u_login_logout = append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login&redirect=' . $redirect); $l_login_logout = $user->lang['LOGIN']; }