Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Note

SinceStarting with katl-commons 3.0, this syntax is deprecated and you should use the new alias name: ldapUserAttr instead.

...

Info
titleAvailability

This routine is available since starting with katl-commons 1.0, changed in 1.1.15 ( for JIRA Jira 4.3.x and JIRA /4.4.x ) and katl-commons 2.0.8 ( for JIRA Jira 5.x) .

Syntax

...

ldapUserRecord(attrib, ldapQuery)

...

ldapUserRecord(attrib, cn, dn, memberof, email, ldapObjectClass)

Description

...

Excerpt

Returns an array of the requested attribute. This is a LDAP search routine. The second form is a convenience routine. Both get the LDAP record and shows the attribute of that user (returned user must be unique, otherwise exception occurs).

Parameters

...

Parameter name

Type

Required

Description

attrib

string

yes

the attribute to be returned

ldapQuery

string

yes

the query, must return exactly one result

...

•CN
•DN
•firstName
•lastName
•displayName
•title
•department
•division
•officeName (mapped on physicalDeliveryOfficeName attribute)
•company
•empID
•manager
•mail
•otherMailbox
•mobile
•homePhone
•workPhone
•userPrincipalName
•winPrincipalName

Tip
titleTip

Since Starting with katl-commons 1.1.15 and 2.0.8, you can retrieve any attribute defined in the schema. 

 

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.

Example

...

Code Block
ldapUserRecord("mobile", user, "", "", "", "user");
//gets the mobile attribute from LDAP user with specified CN

OpenDS example

...

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

 

Notes

...

Note

LDAP must be configured (see LDAP Configuration page).

...

Warning

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

 

See

...

also

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "ldap_support"
labelsldap_support