Permalink
Browse files

MDL-4248 Fix error when updating user profiles and any of these field…

…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...
1 parent 9fa8052 commit 8278b5164b48f4a71fac3e23419be152bb0c943a iarenaza committed May 31, 2008
Showing with 1 addition and 0 deletions.
  1. +1 −0 auth/ldap/auth.php
View
@@ -1096,6 +1096,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) {

0 comments on commit 8278b51

Please sign in to comment.