[Date Prev][Date Next] [Chronological] [Thread] [Top]

LDAP_MOD_DEL



Hi there!

I'm trying to write a small script in PHP3, which determines before
modifying an entry if the attributes should be removed or only modified.

[snip]
<?
Function g_modify_entry($Dir, $DN, $Entry)
{

  $numbers = count($Entry);
       reset($Entry);

      for ($i=0; $i < $numbers; $i++)
        {
          $key = key($Entry);
          if ($Entry[$key] == "")
            {
              $deleteEntry[$key]=$Entry[$key];
            }
          next($Entry);
        }

      ldap_mod_replace($Dir, $DN, $Entry);

      if (count($deleteEntry) > 0)
        {
          ldap_mod_del ($Dir, $DN, $deleteEntry);
        }
}
?>

[snap]

But this doesnt work.
The attribute is being replaced in it's value. But the ldap_mod_del()
doesn't delete anything. I don't get an errormessage or nothing else.
The attribute-value is just changed and nothing else.

Anybody an idea?