From 4f73591af3cdf666118d1f5b0abb1779704f9d39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20S=CC=8Ckoda?= Date: Thu, 22 Nov 2012 11:29:57 +0100 Subject: [PATCH] MDL-36780 add SESSION cleanup to web installer This might help prevent some SESSION problems at the end of installation. --- admin/index.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/admin/index.php b/admin/index.php index 2f88126da1a..bbd528d0ad8 100644 --- a/admin/index.php +++ b/admin/index.php @@ -376,6 +376,10 @@ if (during_initial_install()) { } } + // Cleanup SESSION to make sure other code does not complain in the future. + unset($SESSION->has_timed_out); + unset($SESSION->wantsurl); + // at this stage there can be only one admin unless more were added by install - users may change username, so do not rely on that $adminids = explode(',', $CFG->siteadmins); $adminuser = get_complete_user_data('id', reset($adminids));