4D v16.3LDAP SEARCH ALL |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v16.3
LDAP SEARCH ALL
LDAP SEARCH ALL
The LDAP SEARCH ALL command searches in the target LDAP server for all occurrences matching the criteria defined. This command must be executed within a connection to an LDAP server opened with LDAP LOGIN; otherwise a 1003 error is returned. Note that LDAP servers usually impose a maximum number of entries that can be received from a search. For example, Microsoft Active directory limits this number to 1000 entries by default. In dnRootEntry, pass the Distinguished Name of the LDAP server root entry; the search will start at this entry. In arrResult, pass an object array that will be filled with all matching entries; in this array, each element is an object containing attribute/value pairs returned for a matching entry. You can use the attributes parameter to define the attributes to be returned. In filter, pass the LDAP search filter to execute. The filter string must be compliant with rfc2225. You can pass an empty string "" in order not to filter the search; the "*" is supported to search substrings. In scope, pass one of the following constants from the "LDAP" theme:
In attributes, pass a text array which contains the list of all LDAP attributes to fetch from the matched entries. By default, if this parameter is omitted, all attributes are fetched. Note: Keep in mind that LDAP attribute names are case-sensitive. For more information on LDAP attributes, you can refer to this page that lists all available attributes for the MS Active directory. By default, the command returns attributes as an array if multiple results are found, or as a variable if a single result is found. The optional attributesAsArray parameter allows you to "force" the attribute(s) returned to be formatted as an array or as a variable for each attribute defined:
We want to get the phone number of all users named "smith" in the company directory: ARRAY TEXT($_tabAttributes;0) These examples illustrate the use of the attributesAsArray parameter: ARRAY OBJECT($_entry;0) ARRAY TEXT($_tabAttributes;0)
See also
|
PROPERTIES
Product: 4D
HISTORY
Created: 4D v15 ARTICLE USAGE
4D Language Reference ( 4D v16) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||