LDAP LOGIN()

From Lianjapedia
Jump to: navigation, search

Purpose

Function to test an LDAP/ActiveDirectory user login and return the Groups and Roles the user is a member of

Syntax

LDAP_LOGIN(<cUsername>, <cPassword> [, <cLdapServer[:port]> [, <cLdapBasedn>]])

See Also

GETGID(), GETPID(), GETUID(), ID(), LDAP_USERROLES(), USER(), USERDOMAIN(), USEREMAIL(), USERFULLNAME(), USERNAME(), USERROLES(), USERTENANCY(), Users Tables

Description

The LDAP_LOGIN() function returns the names of the Groups and Roles the specified LDAP/ActiveDirectory user is a member of if the user successfully binds.

Parameter Required Description
cUsername Yes The name of the user
cPassword Yes The password of the user
cLdapServer[:port] No The server hostname or IP address. The port number can also be specified (defaults to :389).
If the environment variable LIANJA_LDAP_SERVER is set, cLdapServer can be omitted.
cLdapBasedn No The Base DN.
If the environment variable LIANJA_LDAP_BASEDN is set, cLdapBasedn can be omitted.

Example

? ldap_login("Mandy Monroe","CcxkTpjFbfw2ulmv","192.168.80.139:389","OU=AD LDS Users,O=Lianja,C=UK"))
HR,Sales,Readers,Users