MDL-49189 auth: Map data to profile fields with uppercase shortnames

This commit is contained in:
Kevin Wiliarty
2015-10-03 08:25:06 -04:00
parent dc3850fc20
commit 36d44b206a
+3 -1
View File
@@ -4156,8 +4156,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.