From c69cd68fcb31f69c3d21e2180958bfca9b43a77a Mon Sep 17 00:00:00 2001 From: Deon George Date: Fri, 28 Aug 2009 23:52:41 +1000 Subject: [PATCH] SF Bug #2828378 - fallback_dn config option no longer works in 1.2.0 --- lib/ds_ldap.php | 3 +++ lib/ds_ldap_pla.php | 4 ++++ 2 files changed, 7 insertions(+) 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);