From c85aa9d60672cdb8b6fc20ea94d2c67409593ffc Mon Sep 17 00:00:00 2001 From: Kevin Wiliarty Date: Fri, 11 Sep 2015 00:39:01 -0400 Subject: [PATCH] MDL-49189 auth: Map data to profile fields with uppercase shortnames --- lib/moodlelib.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 3169d1a0203..7cc9c0e1ac1 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -3809,8 +3809,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. -- 2.11.4.GIT