summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2012-04-16 18:03:02 +0200
committerArthur Schiwon <blizzz@owncloud.com>2012-04-16 18:03:02 +0200
commit66018b89b26313f168669bb1dd5c8b701964782a (patch)
tree85f99d2877ea08c1d2e1e0a3b877f83eb459863b /apps/user_ldap
parent86192c2f8df27d2d4fd4e68b231861b8addcee70 (diff)
downloadnextcloud-server-66018b89b26313f168669bb1dd5c8b701964782a.tar.gz
nextcloud-server-66018b89b26313f168669bb1dd5c8b701964782a.zip
LDAP: don't forget to unbind
Diffstat (limited to 'apps/user_ldap')
-rw-r--r--apps/user_ldap/lib_ldap.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/user_ldap/lib_ldap.php b/apps/user_ldap/lib_ldap.php
index ab815171b8d..eea4a82011c 100644
--- a/apps/user_ldap/lib_ldap.php
+++ b/apps/user_ldap/lib_ldap.php
@@ -23,6 +23,13 @@
define('LDAP_GROUP_MEMBER_ASSOC_ATTR','memberUid');
+//needed to unbind, because we use OC_LDAP only statically
+class OC_LDAP_DESTRUCTOR {
+ public function __destruct() {
+ OC_LDAP::destruct();
+ }
+}
+
class OC_LDAP {
static protected $ldapConnectionRes = false;
static protected $configured = false;
@@ -43,6 +50,10 @@ class OC_LDAP {
self::establishConnection();
}
+ static public function destruct() {
+ @ldap_unbind(self::$ldapConnectionRes);
+ }
+
static public function conf($key) {
$availableProperties = array(
'ldapUserDisplayName',