ldap_get_dn
string ldap_get_dn(resource connectionID, resource result)
Fetches the distinguished name of a result.
Returns:
Distinguished name; FALSE on error
Description:
Returns the distinguished name of a result with only one entry.
Availability:
UNIX/Linux, Windows
Version:
3+, 4+
Example:
Return distinguished names
$filter = "uid=jdoe"; $result = ldap_search($ldap_conn, "dc=foo,dc=com", $filter); $count = ldap_count_entries($ldap_conn ,$result); $entry = ldap_first_entry($ldap_conn, $result); while ($entry) { $dn = ldap_dn2ufn(ldap_get_dn($ldap_conn, $entry)); echo "DN: $dn<BR />\n"; } |
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.