When user logins or updates Profile field which is optional and the field is empty in LDAP, you'll receive: "warning: ldap_mod_del () []: Modify: Invalid syntax in ldap_integration\ldap_integration\LDAPInterface.php on line 214" for each empty field.

Reported before in http://drupal.org/node/80204#comment-439397, but seems like everyone missed it.

This fixes the problem:

Line 214: modules/ldap_integration/ldap_integration/LDAPInterface.php
Change this

          ldap_mod_del($this->connection, $dn, array($key => $old_value));

To

        if ($old_value != null) {
          ldap_mod_del($this->connection, $dn, array($key => $old_value));
        }
CommentFileSizeAuthor
LDAPInterface.php-emptyfield.patch714 bytesckng

Comments

grendzy’s picture

Status: Needs review » Reviewed & tested by the community

This fixed the issue for me, thanks (BTW I was using it on 6.x-1.0-alpha2, and the patch still applies).

eriktoyra’s picture

This patch works for me for 5.x-1.3. Thanks!

johnbarclay’s picture

Status: Reviewed & tested by the community » Closed (won't fix)

Closing 5.x issues to clean out issue queue.