Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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...
commit ad5903f32c1b516aa362b350812678f3a77c4d05 1 parent 255d79e
authored May 31, 2008

Showing 1 changed file with 1 addition and 0 deletions. Show diff stats Hide diff stats

  1. 1  auth/ldap/auth.php
1  auth/ldap/auth.php
@@ -912,6 +912,7 @@ function user_update($olduser, $newuser) {
912 912
                     }
913 913
 
914 914
                     $nuvalue = $textlib->convert($newuser->$key, 'utf-8', $this->config->ldapencoding);
  915
+                    empty($nuvalue) ? $nuvalue = array() : $nuvalue;
915 916
                     $ouvalue = $textlib->convert($olduser->$key, 'utf-8', $this->config->ldapencoding);
916 917
 
917 918
                     foreach ($ldapkeys as $ldapkey) {

0 notes on commit ad5903f

Please sign in to comment.
Something went wrong with that request. Please try again.