summaryrefslogtreecommitdiffstats
path: root/lib/private/user/database.php
diff options
context:
space:
mode:
authoradrien <adrien.waksberg@believedigital.com>2014-03-10 17:27:51 +0100
committeradrien <adrien.waksberg@believedigital.com>2014-03-10 17:27:51 +0100
commit415b1d03bca12c082ff70e44d3b7b8b3fbc8f347 (patch)
treed91ccd1476aac257a7fc8db80afbeff7c3b7ab41 /lib/private/user/database.php
parentba9d8f7c1a448e0a769ee31d20ee75c1616b22e7 (diff)
downloadnextcloud-server-415b1d03bca12c082ff70e44d3b7b8b3fbc8f347.tar.gz
nextcloud-server-415b1d03bca12c082ff70e44d3b7b8b3fbc8f347.zip
fix cache when remove an user
Diffstat (limited to 'lib/private/user/database.php')
-rw-r--r--lib/private/user/database.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/private/user/database.php b/lib/private/user/database.php
index 591ea2a5c98..4a9ad1b825e 100644
--- a/lib/private/user/database.php
+++ b/lib/private/user/database.php
@@ -93,7 +93,14 @@ class OC_User_Database extends OC_User_Backend {
$query = OC_DB::prepare('DELETE FROM `*PREFIX*users` WHERE `uid` = ?');
$result = $query->execute(array($uid));
- return $result ? true : false;
+ if ($result) {
+ if (isset(self::$cache[$uid])) {
+ unset(self::$cache[$uid]);
+ }
+ return true;
+ }
+
+ return false;
}
/**