Merge branch 'wip-MDL-49189-MOODLE_29_STABLE' of https://github.com/kwiliarty/moodle into MOODLE_29_STABLE

This commit is contained in:
Dan Poltawski
2015-10-05 15:03:16 +01:00
+3 -1
View File
@@ -3813,8 +3813,10 @@ function update_user_record_by_id($id) {
$customfields = $userauth->get_custom_user_profile_fields();
foreach ($newinfo as $key => $value) {
$key = strtolower($key);
$iscustom = in_array($key, $customfields);
if (!$iscustom) {
$key = strtolower($key);
}
if ((!property_exists($oldinfo, $key) && !$iscustom) or $key === 'username' or $key === 'id'
or $key === 'auth' or $key === 'mnethostid' or $key === 'deleted') {
// Unknown or must not be changed.