diff --git a/phpgwapi/inc/class.auth_ldap.inc.php b/phpgwapi/inc/class.auth_ldap.inc.php index be220ac11b..50be22c449 100644 --- a/phpgwapi/inc/class.auth_ldap.inc.php +++ b/phpgwapi/inc/class.auth_ldap.inc.php @@ -46,18 +46,13 @@ $username = $GLOBALS['egw']->translation->convert($username,$GLOBALS['egw']->translation->charset(),'utf-8'); $passwd = $GLOBALS['egw']->translation->convert($passwd,$GLOBALS['egw']->translation->charset(),'utf-8'); - if(!$ldap = @ldap_connect($GLOBALS['egw_info']['server']['ldap_host'])) + if(!$ldap = $GLOBALS['egw']->common->ldapConnect()) { $GLOBALS['egw']->log->message('F-Abort, Failed connecting to LDAP server for authenication, execution stopped'); $GLOBALS['egw']->log->commit(); return False; } - if($GLOBALS['egw_info']['server']['ldap_version3']) - { - ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3); - } - /* Login with the LDAP Admin. User to find the User DN. */ if(!@ldap_bind($ldap, $GLOBALS['egw_info']['server']['ldap_root_dn'], $GLOBALS['egw_info']['server']['ldap_root_pw'])) {