diff --git a/apps/user_ldap/lib/Wizard.php b/apps/user_ldap/lib/Wizard.php index 6c3e35c10bcac..9032f60a4c0a2 100644 --- a/apps/user_ldap/lib/Wizard.php +++ b/apps/user_ldap/lib/Wizard.php @@ -1378,7 +1378,7 @@ private function getPortSettingsToTry() { $portSettings[] = ['port' => $port, 'tls' => true]; } $portSettings[] = ['port' => $port, 'tls' => false]; - } elseif ($port === 0) { + } elseif ($this->configuration->usesLdapi()) { $portSettings[] = ['port' => '', 'tls' => false]; }