Closed Touchwoody closed 7 years ago
This is linked to a SO-question which might contain more details: https://stackoverflow.com/questions/31288742/appending-values-to-a-multi-value-ldap-attribute-with-zend-ldap/31289134#31289134
@Touchwoody you can (as a workaround) do this:
$ldap = new \Zend\Ldap\Ldap(...);
$res = $ldap->getResource();
ldap_mod_add($res, ...);
(See also Issue #4)
Closing due to inactivity and a workaround / answer exists.
Reopening as it's a valid feature-request
+1 for this feature
This has been fixed with release 2.8.0
Hey there,
could you introduce a function (I'd sugg. append()?) that uses ldap_mod_add() ?
Right now the only way to push values to the LDAP server is via update(), and for this to work I have to push the old value plus the new values. For a multi-value field such an array can get very large.
This is particularly troublesome, if you update e.g. the "member" attribute in a GroupOfNames object, which is used by openldap's memberof overlay. if I update the server with probably thousands of values, this might lead to a server timeout, cause the memberof overlay does "stuff" (updates? index? sanity checks?). We could avoid this difficulties, if we'd only append (like ldap_mod_add() does) a new value, instead of pushing the whole array back. Unfortunately Zend\Ldap doesn't offer this mechanism.