diff --git a/lib/ds_ldap.php b/lib/ds_ldap.php index 05356b1..5494eb8 100644 --- a/lib/ds_ldap.php +++ b/lib/ds_ldap.php @@ -258,6 +258,9 @@ class ldap extends DS { else $userDN = $this->getLoginID($user,'login'); + if (! $userDN && $this->getValue('login','fallback_dn')) + $userDN = $user; + if (! $userDN) return false; diff --git a/lib/ds_ldap_pla.php b/lib/ds_ldap_pla.php index f45b1de..f5b91ab 100644 --- a/lib/ds_ldap_pla.php +++ b/lib/ds_ldap_pla.php @@ -27,6 +27,10 @@ class ldap_pla extends ldap { 'desc'=>'Whether to show the "Create new Entry here" in the tree browser', 'default'=>true); + $this->default->login['fallback_dn'] = array( + 'desc'=>'If the attribute base login fails, see if a DN was entered', + 'default'=>false); + $this->default->query['disable_default'] = array( 'desc'=>'Configuration to disable the default query template', 'default'=>false);