MDL-24530 Fixed core functions usage during early install phase when the site is not fully set up yet

This commit is contained in:
David Mudrak
2010-10-06 08:50:31 +00:00
parent ec7e6c6de8
commit ee8dd77f75
2 changed files with 5 additions and 4 deletions
+4 -2
View File
@@ -2605,8 +2605,10 @@ class admin_setting_users_with_capability extends admin_setting_configmultiselec
'$@NONE@$' => get_string('nobody'),
'$@ALL@$' => get_string('everyonewhocan', 'admin', get_capability_string($this->capability)),
);
foreach ($users as $user) {
$this->choices[$user->username] = fullname($user);
if (is_array($users)) {
foreach ($users as $user) {
$this->choices[$user->username] = fullname($user);
}
}
return true;
}