Implement LDAP user lookup.
This is required to improve compatibility when the DN cannot be easily computed from the user name. Additionally, this allows automatically getting the full name and email address from LDAP.
This commit is contained in:
@@ -30,10 +30,26 @@ define('LDAP_SERVER', '');
|
||||
// LDAP server port (389 by default)
|
||||
define('LDAP_PORT', 389);
|
||||
|
||||
// User LDAP DN
|
||||
// Example for ActiveDirectory: 'MYDOMAIN\\%s' or '%s@mydomain.local'
|
||||
// Example for OpenLDAP: 'uid=%s,ou=People,dc=example,dc=com'
|
||||
define('LDAP_USER_DN', '%s');
|
||||
// LDAP username to connect with. NULL for anonymous bind (by default).
|
||||
define('LDAP_USERNAME', null);
|
||||
|
||||
// LDAP password to connect with. NULL for anonymous bind (by default).
|
||||
define('LDAP_PASSWORD', null);
|
||||
|
||||
// LDAP account base, i.e. root of all user account
|
||||
// Example: ou=people,dc=example,dc=com
|
||||
define('LDAP_ACCOUNT_BASE', '');
|
||||
|
||||
// LDAP query pattern to use when searching for a user account
|
||||
// Example for ActiveDirectory: '(&(objectClass=user)(sAMAccountName=%s))'
|
||||
// Example for OpenLDAP: 'uid=%s'
|
||||
define('LDAP_USER_PATTERN', '');
|
||||
|
||||
// Name of an attribute of the user account object which should be used as the full name of the user.
|
||||
define('LDAP_ACCOUNT_FULLNAME', 'displayname');
|
||||
|
||||
// Name of an attribute of the user account object which should be used as the email of the user.
|
||||
define('LDAP_ACCOUNT_EMAIL', 'mail');
|
||||
|
||||
// Enable/disable Google authentication
|
||||
define('GOOGLE_AUTH', false);
|
||||
|
||||
Reference in New Issue
Block a user