From cbf4fa90d63b255359ba15974637e8a26604a9c7 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Wed, 21 Sep 2016 11:13:31 -0400 Subject: [PATCH] T1521: kolab_auth: Add possibility to close LDAP connection on request --- plugins/kolab_auth/kolab_auth.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/plugins/kolab_auth/kolab_auth.php b/plugins/kolab_auth/kolab_auth.php index e223adbc..fadd3d2b 100644 --- a/plugins/kolab_auth/kolab_auth.php +++ b/plugins/kolab_auth/kolab_auth.php @@ -768,6 +768,17 @@ class kolab_auth extends rcube_plugin return self::$ldap; } + /** + * Close LDAP connection + */ + public static function ldap_close() + { + if (self::$ldap) { + self::$ldap->close(); + self::$ldap = null; + } + } + /** * Parses LDAP DN string with replacing supported variables. * See kolab_auth_ldap::parse_vars()