Returns a single attribute associated with a user from the Ldap Registry identified by properties in the
XIldap.properties file file.
The returned array contains one value for each occurrence of the property in the registry.
When a property only occurs once, this array will only contain a single value.
var root = "OU=Ebase Users and Groups,DC=ebasetech,DC=com";
var userAttr = "sAMAccountName";
var attrs = LdapServices.getUserAttribute(system.securityManager.userName, "mail", root, userAttr, false);
if (attrs.length > 0)
var email = attrs[0];
The returned array contains one value for each occurrence of the property in the registry. When a property only occurs once, this array will only contain a single value.
This method works in the same way as #getUserAttributes(String, String, String, boolean) except that values for only one attribute are returned.
Javascript example: