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.
  • Loading branch information...
1 parent 255d79e commit ad5903f32c1b516aa362b350812678f3a77c4d05 iarenaza committed May 31, 2008
Showing with 1 addition and 0 deletions.
  1. +1 −0 auth/ldap/auth.php
View
@@ -912,6 +912,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 ad5903f

Please sign in to comment.