Script functions reference > Script functions in alphabetical order > L > LdapGetAttrValue

LdapGetAttrValue
Syntax
LdapGetAttrValue(entryID, attrName, valueIdx);
entryID 
attrName
valueIdx
Note:
Indexing is 0 based, i.e. valueIdx 0 is the first value of the attribute, valueIdx 1 is the second value, etc.
Description
Retrieves a value from a specific attribute on an entry.
Returns
LdapGetAttrValue returns a value of the attribute specified in attrName. An attribute can have several values, and which one is returned depends on the index specified in valueIdx. Note that the indexing is 0 based, i.e. if the specified index is 0, the first value of the attribute is returned.
An empty string is returned if the search fails.
Example
$name=ldapGetAttrValue($theuser,"cn",0);
In this example, the first value of the cn attribute of the theuser entry is assigned to the name variable.
OpenText StreamServe 5.6 Updated: 2013-03-01