ldap_getvalues

The ldap_getvalues() function returns the values that are associated with the specified attribute. The values are returned in a list where each list element represents a value. The length() function can be used to determine the number of elements that are returned in result. If ldap_getvalues() is successful, result has the format {"value", "value", …}.

The ldap_getvalues() function is typically used after a call to ldap_search(), ldap_firstentry(), or ldap_nextentry() to retrieve attribute values for the entry that is currently being processed.

result = ldap_getvalues (LDAPEntry, attributeName);
LDAPEntry Required. An LDAP entry that is created by ldap_firstentry(), ldap_nextentry(), or ldap_search().
attributeName Required. String that identifies the attribute for which a value should be returned.
list If successful, then a list of character strings is returned. Each element in the list contains a value.

empty list

Error condition, list length is set to zero.
result = ldap_getvalues (LDAPEntry, "uid");

For more information, please see the following: