ldap_mod_add

bool ldap_mod_add(resource connectionID, string DN, array entry) 
connectionID Connection ID
DN Distinguished name of the entry to be modified
entry Array of the attribute information to be added

Adds a modification to an entry.

Returns:

TRUE on success; FALSE on error

Description:

This function is used when you want to add a simple attribute to the entry that corresponds to the DN specified.

Availability:

UNIX/Linux, Windows

Version:

3.0.8+, 4+

Example:

Add new email addresses to an LDAP entry
 $attr["mail"][] = "jdoe2@foo.com"; $attr["mail"][] = "jdoe2@foo.com"; $attr["mail"][] = "jdoe3@foo.com"; $return = ldap_mod_add($ldapconn, "uid=jdoe,ou=People,dc=foo,dc=com", $attr); if (TRUE === $result) { echo "The attribute was successfully ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.