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:         [EMAIL PROTECTED]            |
      | Voice:                          +46-42-26 43 45            |
      +--"Freedom is just another word for nothing left to loose"--+




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to