|
|
|
@@ -98,7 +98,7 @@ class LoginLDAPPlugin extends Plugin
|
|
|
|
$opt_referrals = $this->config->get('plugins.login-ldap.opt_referrals');
|
|
|
|
$opt_referrals = $this->config->get('plugins.login-ldap.opt_referrals');
|
|
|
|
$blacklist = $this->config->get('plugins.login-ldap.blacklist_ldap_fields', []);
|
|
|
|
$blacklist = $this->config->get('plugins.login-ldap.blacklist_ldap_fields', []);
|
|
|
|
|
|
|
|
|
|
|
|
// Dedicated search bind account (for when regular users lack search permissions)
|
|
|
|
// Alternate search user (for when regular users lack search permissions)
|
|
|
|
$search_bind_enabled = $this->config->get('plugins.login-ldap.search_bind_enabled', false);
|
|
|
|
$search_bind_enabled = $this->config->get('plugins.login-ldap.search_bind_enabled', false);
|
|
|
|
$search_bind_dn = $this->config->get('plugins.login-ldap.search_bind_dn');
|
|
|
|
$search_bind_dn = $this->config->get('plugins.login-ldap.search_bind_dn');
|
|
|
|
$search_bind_password = $this->config->get('plugins.login-ldap.search_bind_password');
|
|
|
|
$search_bind_password = $this->config->get('plugins.login-ldap.search_bind_password');
|
|
|
|
@@ -139,7 +139,7 @@ class LoginLDAPPlugin extends Plugin
|
|
|
|
// Try to login via LDAP
|
|
|
|
// Try to login via LDAP
|
|
|
|
$ldap->bind($username, $credentials['password']);
|
|
|
|
$ldap->bind($username, $credentials['password']);
|
|
|
|
|
|
|
|
|
|
|
|
// Set up search LDAP connection (use dedicated bind if configured)
|
|
|
|
// Set up search LDAP connection (use separate bind if configured)
|
|
|
|
if ($search_bind_enabled && $search_bind_dn) {
|
|
|
|
if ($search_bind_enabled && $search_bind_dn) {
|
|
|
|
/** @var Ldap $searchLdap */
|
|
|
|
/** @var Ldap $searchLdap */
|
|
|
|
$searchLdap = Ldap::create('ext_ldap', $ldap_config);
|
|
|
|
$searchLdap = Ldap::create('ext_ldap', $ldap_config);
|
|
|
|
|