From 735738fe6fbdc3afb6a9fd1d5fbec36b5020f9aa Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Thu, 23 Jun 2011 23:54:39 +0200 Subject: [PATCH] user_ldap: close ldap connection in dtor --- apps/user_ldap/user_ldap.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php index 1718a307cc..1ee9809b3b 100644 --- a/apps/user_ldap/user_ldap.php +++ b/apps/user_ldap/user_ldap.php @@ -44,6 +44,12 @@ class OC_USER_LDAP extends OC_USER_BACKEND { $this->ldap_filter = OC_APPCONFIG::getValue('user_ldap', 'ldap_filter',''); } + function __destruct() { + // close the connection + if( $this->ds ) + ldap_unbind($this->ds); + } + private function getDs() { if(!$this->ds) { $this->ds = ldap_connect( $this->ldap_host, $this->ldap_port );