diff options
Diffstat (limited to 'apps/user_ldap/lib/wizard.php')
-rw-r--r-- | apps/user_ldap/lib/wizard.php | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/apps/user_ldap/lib/wizard.php b/apps/user_ldap/lib/wizard.php index e53ff35cfd6..20926fb06a4 100644 --- a/apps/user_ldap/lib/wizard.php +++ b/apps/user_ldap/lib/wizard.php @@ -1035,13 +1035,6 @@ class Wizard extends LDAPUtility { if(!$hostInfo) { throw new \Exception($this->l->t('Invalid Host')); } - if(isset($hostInfo['scheme'])) { - if(isset($hostInfo['port'])) { - //problem - } else { - $host .= ':' . $port; - } - } \OCP\Util::writeLog('user_ldap', 'Wiz: Attempting to connect ', \OCP\Util::DEBUG); $cr = $this->ldap->connect($host, $port); if(!is_resource($cr)) { @@ -1291,12 +1284,10 @@ class Wizard extends LDAPUtility { return $this->cr; } - $host = $this->configuration->ldapHost; - if(strpos($host, '://') !== false) { - //ldap_connect ignores port parameter when URLs are passed - $host .= ':' . $this->configuration->ldapPort; - } - $cr = $this->ldap->connect($host, $this->configuration->ldapPort); + $cr = $this->ldap->connect( + $this->configuration->ldapHost, + $this->configuration->ldapPort + ); $this->ldap->setOption($cr, LDAP_OPT_PROTOCOL_VERSION, 3); $this->ldap->setOption($cr, LDAP_OPT_REFERRALS, 0); |