diff options
author | Nathan Neulinger <nneul@neulinger.org> | 2024-08-07 08:30:24 -0500 |
---|---|---|
committer | Nathan Neulinger <nneul@neulinger.org> | 2024-08-07 11:23:57 -0500 |
commit | cff9a5412811db7b756522adfc6304eab29fab36 (patch) | |
tree | 2d7afbf213965b0423c073a96e3199351b99ca45 /lib | |
parent | a09f9f21cb0c1d60c498a0945989b20f2b3f00a7 (diff) | |
download | dokuwiki-cff9a5412811db7b756522adfc6304eab29fab36.tar.gz dokuwiki-cff9a5412811db7b756522adfc6304eab29fab36.zip |
Support a URI parameter for ldap since current code doesn't actually work
Diffstat (limited to 'lib')
-rw-r--r-- | lib/plugins/authldap/auth.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index e61a44343..2054c1b05 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -551,7 +551,11 @@ class auth_plugin_authldap extends AuthPlugin $servers = explode(',', $this->getConf('server')); foreach ($servers as $server) { $server = trim($server); - $this->con = @ldap_connect($server, $port); + if (str_starts_with($server, 'ldap://') || str_starts_with($server, 'ldaps://')) { + $this->con = @ldap_connect($server); + } else { + $this->con = @ldap_connect($server, $port); + } if (!$this->con) { continue; } |