function get_user_field_name($field) {
// Some fields have language strings which are not the same as field name.
switch ($field) {
- case 'phone1' : {
- return get_string('phone');
- }
case 'url' : {
return get_string('webpage');
}
$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.