We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9872396 + cff9a54 commit f1a3405Copy full SHA for f1a3405
lib/plugins/authldap/auth.php
@@ -551,7 +551,11 @@ protected function openLDAP()
551
$servers = explode(',', $this->getConf('server'));
552
foreach ($servers as $server) {
553
$server = trim($server);
554
- $this->con = @ldap_connect($server, $port);
+ if (str_starts_with($server, 'ldap://') || str_starts_with($server, 'ldaps://')) {
555
+ $this->con = @ldap_connect($server);
556
+ } else {
557
+ $this->con = @ldap_connect($server, $port);
558
+ }
559
if (!$this->con) {
560
continue;
561
}
0 commit comments