ldap_firstentry

The ldap_firstentry() function returns the first entry in the specified LDAP message that is returned from ldap_search().

The first entry message is needed to retrieve successive entries from the specified LDAP message by using the ldap_nextentry() function.

The ldap_firstentry() function does not retrieve values. It returns a unique entry. The result can be used in a function such as ldap_getvalues() to actually retrieve attribute values.

result = ldap_firstentry (LDAPEntry);
LDAPEntry Required. LDAP message. ldap_search() generates LDAP messages.
LDAPEntry An LDAP entry.
Empty String Error.
result = ldap_firstentry (LDM);

For more information, please see the following: