Delete LDAP attribute value

From: Date: Thu, 29 Mar 2001 17:43:09 +0000
Subject: Delete LDAP attribute value
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-46070@lists.php.net to get a copy of this message
Hi people I have written a website to manage our LDAP directory, but there is one outstanding problem that I can find any solution to. What I need to do is to delete a single value from a multivalued attribute. I can't figure out the correct arguments to do this Attribute X Values Y Z I want to delete the Y value only, not the complete attribute. What is the correct syntax ?. My value of the is stored in OLDVALUE (i.e Y). $dn = "cn=$KEY,ou=FOO,o=bar"; $rs = ldap_get_entries ($ld,$root,$filter); $index=0; while ($rs[0]["FOO"][$index] != $OLDVALUE) ++$index; echo "Removing value $index from ebaddresslist in $dn<br>"; $foo["FOO"][$index] = ""; ??? $result = ldap_mod_del ($ld,$dn,$foo); This does not work. Any clues are most welcome /Anders -- +------------------------------------------------------------+ | Anders Östling, IKEA Corporate Technology Group | | E-mail: anders.ostling@neurope.ikea.com | | Voice: +46-42-26 43 45 | +--"Freedom is just another word for nothing left to loose"--+

« previous php.general (#46070) next »