ldapUserAttr

Looking for the documentation on the newest versions of SIL Engine and the Simple Issue Language for Jira 8 for Server/Data Center? Click here !

Availability

This routine is available starting with SIL Engine™ 3.0.

Syntax

ldapUserAttr(attrib, ldapQuery[, ldapName])

Description

Returns an array of the requested attribute. This is an LDAP search routine.

It gets the LDAP record and shows the attribute of that user. Returned user must be unique otherwise exception occurs. You can retrieve any attribute defined in the scheme.

Alias

ldapUserRecord(attrib, ldapQuery) (deprecated)

 Parameters

Parameter name

Type

Required

Description

attrib

string

yes

Attribute to be returned.

ldapQuery

string

yes

Query, must return exactly one result.

ldapNamestringNoOptional, stating with version 4.0, you can specify the LDAP server that must be searched. If missing, it's the default LDAP server.

Returns

string []

The values of the specified attribute. If the attribute only has one value, the array will contain only one element, but will still be an array and not a single string.

OpenDS Example

string email = ldapUserAttr("mail", "(&(uid=user.1)(objectClass=inetOrgPerson))");
string address = ldapUserAttr("postalAddress", "(&(uid=user.1)(objectClass=inetOrgPerson))");


Notes

LDAP must be configured. See LDAP configuration page.

Only Microsoft Active Directory is supported at this time, but it might work with other as well (tested with OpenDS). To provide support for other LDAP types contact us.


See also