Voting

: max(five, zero)?
(Example: nine)

The Note You're Voting On

arimus at apu dot edu
25 years ago
After a couple hours of searching and not finding anything on the ldap_mod_del function worth anything, I started trying to figure out myself what format the "array entry" parameter needed to be in. Here is what I found:

The entry array is a hash with the attribute name as the hash key and the specific value you want deleted for that attribute as the corresponding hash value.

-- Example

Current values for the attributes of of a particular entry:

uid: testuser
mail: [email protected]
mail: [email protected]

How to remove the first value of mail so that only the second value for mail exists:

$entry["mail"] = "[email protected]";
$result = ldap_mod_del($connID, $dn, $entry);

So if you want to remove all instances of an attribute, you have to do it one by one.

<< Back to user notes page

To Top