Skip to content
Snippets Groups Projects
Commit 66018b89 authored by Arthur Schiwon's avatar Arthur Schiwon
Browse files

LDAP: don't forget to unbind

parent 86192c2f
No related branches found
No related tags found
No related merge requests found
......@@ -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',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment