From 4e64f9d62e24a9a5eff07367ffa0ce8e840bda89 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 3 Aug 2006 08:21:42 +0000 Subject: [PATCH] fix for accounts in LDAP, but no passwords (auth against something else), in that case we need to search with the root_dn and not the user himself --- addressbook/inc/class.so_ldap.inc.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/addressbook/inc/class.so_ldap.inc.php b/addressbook/inc/class.so_ldap.inc.php index 53bb89fe86..b660a47677 100644 --- a/addressbook/inc/class.so_ldap.inc.php +++ b/addressbook/inc/class.so_ldap.inc.php @@ -224,12 +224,16 @@ class so_ldap { $GLOBALS['egw_info']['server']['ldap_contact_host'] = $GLOBALS['egw_info']['server']['ldap_host']; $GLOBALS['egw_info']['server']['ldap_contact_context'] = $GLOBALS['egw_info']['server']['ldap_context']; + $this->ds = $GLOBALS['egw']->ldap->ldapConnect(); + } + else + { + $this->ds = $GLOBALS['egw']->ldap->ldapConnect( + $GLOBALS['egw_info']['server']['ldap_contact_host'], + $GLOBALS['egw_info']['user']['account_dn'], + $GLOBALS['egw_info']['user']['passwd'] + ); } - $this->ds = $GLOBALS['egw']->ldap->ldapConnect( - $GLOBALS['egw_info']['server']['ldap_contact_host'], - $GLOBALS['egw_info']['user']['account_dn'], - $GLOBALS['egw_info']['user']['passwd'] - ); $this->ldapServerInfo = $GLOBALS['egw']->ldap->getLDAPServerInfo($GLOBALS['egw_info']['server']['ldap_contact_host']); foreach($this->schema2egw as $schema => $attributes)