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
}
$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) {