Permalink
Browse files

MDL-31819: admin: allow install to proceed when multiple admins exist…

… already
  • Loading branch information...
1 parent 48e529c commit a7c9609ba5ef035c136fda84b73b5a3a3dff004a @tlevi tlevi committed with Sam Hemelryk Feb 29, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 admin/index.php
View
@@ -306,8 +306,8 @@
}
}
- // 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

0 comments on commit a7c9609

Please sign in to comment.