MDL-60926 auth: do not map very long profile fields

This commit is contained in:
Marina Glancy
2017-12-04 09:28:38 +08:00
parent cb9d984b86
commit 3f79afbb78
4 changed files with 24 additions and 5 deletions
+3 -3
View File
@@ -3932,11 +3932,11 @@ function update_user_record_by_id($id) {
// Unknown or must not be changed.
continue;
}
$confval = $userauth->config->{'field_updatelocal_' . $key};
$lockval = $userauth->config->{'field_lock_' . $key};
if (empty($confval) || empty($lockval)) {
if (empty($userauth->config->{'field_updatelocal_' . $key}) || empty($userauth->config->{'field_lock_' . $key})) {
continue;
}
$confval = $userauth->config->{'field_updatelocal_' . $key};
$lockval = $userauth->config->{'field_lock_' . $key};
if ($confval === 'onlogin') {
// MDL-4207 Don't overwrite modified user profile values with
// empty LDAP values when 'unlocked if empty' is set. The purpose