summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib/User
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2017-07-13 14:32:52 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2017-08-31 23:03:21 +0200
commitab92e2ee14800260da9259a302207d68d57a0f75 (patch)
treee94a9372654927e70fcad758646f2d3720525aa0 /apps/user_ldap/lib/User
parentefedc81c0a2f1539806854f8a73c40fc61b1e13e (diff)
downloadnextcloud-server-ab92e2ee14800260da9259a302207d68d57a0f75.tar.gz
nextcloud-server-ab92e2ee14800260da9259a302207d68d57a0f75.zip
listen to deletion hooks for proper handling, adjust and add tests
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/user_ldap/lib/User')
-rw-r--r--apps/user_ldap/lib/User/Manager.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/apps/user_ldap/lib/User/Manager.php b/apps/user_ldap/lib/User/Manager.php
index ea4d071b646..743456d68e2 100644
--- a/apps/user_ldap/lib/User/Manager.php
+++ b/apps/user_ldap/lib/User/Manager.php
@@ -135,6 +135,19 @@ class Manager {
}
/**
+ * removes a user entry from the cache
+ * @param $uid
+ */
+ public function invalidate($uid) {
+ if(!isset($this->usersByUid[$uid])) {
+ return;
+ }
+ $dn = $this->usersByUid[$uid]->getDN();
+ unset($this->usersByUid[$uid]);
+ unset($this->usersByDN[$dn]);
+ }
+
+ /**
* @brief checks whether the Access instance has been set
* @throws \Exception if Access has not been set
* @return null