From 2aa07f0574b1f2d5cc98f5aa28a924b8f3db0eea Mon Sep 17 00:00:00 2001 From: cdujeu Date: Sat, 19 Oct 2013 10:45:59 +0200 Subject: [PATCH] Implement #291 --- core/src/plugins/auth.ldap/class.ldapAuthDriver.php | 6 ++++++ core/src/plugins/auth.ldap/manifest.xml | 1 + 2 files changed, 7 insertions(+) diff --git a/core/src/plugins/auth.ldap/class.ldapAuthDriver.php b/core/src/plugins/auth.ldap/class.ldapAuthDriver.php index 508e915dbf..c05903878c 100644 --- a/core/src/plugins/auth.ldap/class.ldapAuthDriver.php +++ b/core/src/plugins/auth.ldap/class.ldapAuthDriver.php @@ -63,6 +63,9 @@ public function init($options) parent::init($options); $options = $this->options; $this->ldapUrl = $options["LDAP_URL"]; + if (isSet($options["LDAP_PROTOCOL"]) && $options["LDAP_PROTOCOL"] == "ldaps") { + $this->ldapUrl = "ldaps://".$this->ldapUrl; + } if ($options["LDAP_PORT"]) $this->ldapPort = $options["LDAP_PORT"]; if ($options["LDAP_USER"]) $this->ldapAdminUsername = $options["LDAP_USER"]; if ($options["LDAP_PASSWORD"]) $this->ldapAdminPassword = $options["LDAP_PASSWORD"]; @@ -137,6 +140,9 @@ public function parseReplicatedParams($options, $optionsNames) public function testLDAPConnexion($options) { $this->ldapUrl = $options["LDAP_URL"]; + if (isSet($options["LDAP_PROTOCOL"]) && $options["LDAP_PROTOCOL"] == "ldaps") { + $this->ldapUrl = "ldaps://".$this->ldapUrl; + } if ($options["LDAP_PORT"]) $this->ldapPort = $options["LDAP_PORT"]; if ($options["LDAP_USER"]) $this->ldapAdminUsername = $options["LDAP_USER"]; if ($options["LDAP_PASSWORD"]) $this->ldapAdminPassword = $options["LDAP_PASSWORD"]; diff --git a/core/src/plugins/auth.ldap/manifest.xml b/core/src/plugins/auth.ldap/manifest.xml index daccc48f65..a0145dd4a4 100644 --- a/core/src/plugins/auth.ldap/manifest.xml +++ b/core/src/plugins/auth.ldap/manifest.xml @@ -10,6 +10,7 @@ +