From a7c9609ba5ef035c136fda84b73b5a3a3dff004a Mon Sep 17 00:00:00 2001 From: Tony Levi Date: Wed, 29 Feb 2012 14:50:48 +1030 Subject: [PATCH] MDL-31819: admin: allow install to proceed when multiple admins exist already --- admin/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/index.php b/admin/index.php index 7e8a6fc0f40..70dcafa0805 100644 --- a/admin/index.php +++ b/admin/index.php @@ -306,8 +306,8 @@ if (during_initial_install()) { } } - // at this stage there can be only one admin - users may change username, so do not rely on that - $adminuser = get_complete_user_data('id', $CFG->siteadmins); + // 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 + $adminuser = get_complete_user_data('id', reset(explode(',', $CFG->siteadmins))); if ($adminuser->password === 'adminsetuppending') { // prevent installation hijacking