array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'en', ), 'this' => array ( 0 => 'function.ldap-get-dn.php', 1 => 'ldap_get_dn', 2 => 'Get the DN of a result entry', ), 'up' => array ( 0 => 'ref.ldap.php', 1 => 'LDAP Functions', ), 'prev' => array ( 0 => 'function.ldap-get-attributes.php', 1 => 'ldap_get_attributes', ), 'next' => array ( 0 => 'function.ldap-get-entries.php', 1 => 'ldap_get_entries', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/ldap/functions/ldap-get-dn.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

ldap_get_dn

(PHP 4, PHP 5, PHP 7, PHP 8)

ldap_get_dnGet the DN of a result entry

Description

ldap_get_dn(LDAP\Connection $ldap, LDAP\ResultEntry $entry): string|false

Finds out the DN of an entry in the result.

Parameters

ldap

An LDAP\Connection instance, returned by ldap_connect().

entry

An LDAP\ResultEntry instance.

Return Values

Returns the DN of the result entry and false on error.

Changelog

Version Description
8.1.0 The ldap parameter expects an LDAP\Connection instance now; previously, a valid ldap link resource was expected.
8.1.0 The entry parameter expects an LDAP\ResultEntry instance now; previously, a valid ldap result entry resource was expected.