From 6a52b967f4434f09d3a8a5d444d66b447308daaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20de=20Grandpr=C3=A9?= Date: Sun, 2 Jan 2022 16:37:07 -0500 Subject: [PATCH 1/2] =?UTF-8?q?Permettre=20de=20sortir=20de=20la=20fonctio?= =?UTF-8?q?n=20de=20connexion=20apr=C3=A8s=20authentification.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/core/class/ldap.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/ldap.class.php b/htdocs/core/class/ldap.class.php index 48618a83dd9..02268fffaa2 100644 --- a/htdocs/core/class/ldap.class.php +++ b/htdocs/core/class/ldap.class.php @@ -301,7 +301,8 @@ class Ldap */ public function close() { - if ($this->connection && !@ldap_close($this->connection)) { + $r_type = get_resource_type($this->connection); + if ($this->connection && ($r_type == "Unknown" || !@ldap_close($this->connection))) { return false; } else { return true; From aee61cb4700ac8379eb68214d30a7f960a6149fa Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 6 Jan 2022 16:02:47 +0100 Subject: [PATCH 2/2] Update ldap.class.php --- htdocs/core/class/ldap.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/ldap.class.php b/htdocs/core/class/ldap.class.php index 02268fffaa2..fa8f05873a6 100644 --- a/htdocs/core/class/ldap.class.php +++ b/htdocs/core/class/ldap.class.php @@ -302,7 +302,7 @@ class Ldap public function close() { $r_type = get_resource_type($this->connection); - if ($this->connection && ($r_type == "Unknown" || !@ldap_close($this->connection))) { + if ($this->connection && ($r_type === "Unknown" || !@ldap_close($this->connection))) { return false; } else { return true;