Skip to content

Commit

Permalink
MDL-4248 Fix error when updating user profiles and any of these field…
Browse files Browse the repository at this point in the history
…s is empty

According to http://es2.php.net/manual/en/function.ldap-modify.php#43216 we
need to specify an array() value to delete an attribute's value, instead of an
empty string.

Merged from MOODLE_18_STABLE
  • Loading branch information
iarenaza committed May 31, 2008
1 parent 29f8376 commit 15f80fd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions auth/ldap/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -1099,6 +1099,7 @@ function user_update($olduser, $newuser) {
}

$nuvalue = $textlib->convert($newuser->$key, 'utf-8', $this->config->ldapencoding);
empty($nuvalue) ? $nuvalue = array() : $nuvalue;
$ouvalue = $textlib->convert($olduser->$key, 'utf-8', $this->config->ldapencoding);

foreach ($ldapkeys as $ldapkey) {
Expand Down

0 comments on commit 15f80fd

Please sign in to comment.