mirror of
https://github.com/nextcloud/server.git
synced 2026-06-14 19:20:35 -04:00
LDAP: don't forget to unbind
This commit is contained in:
parent
86192c2f8d
commit
66018b89b2
1 changed files with 11 additions and 0 deletions
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Reference in a new issue