aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/lib
diff options
context:
space:
mode:
authorNathan Neulinger <nneul@neulinger.org>2024-08-07 08:30:24 -0500
committerNathan Neulinger <nneul@neulinger.org>2024-08-07 11:23:57 -0500
commitcff9a5412811db7b756522adfc6304eab29fab36 (patch)
tree2d7afbf213965b0423c073a96e3199351b99ca45 /lib
parenta09f9f21cb0c1d60c498a0945989b20f2b3f00a7 (diff)
downloaddokuwiki-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.php6
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;
}