From 415b1d03bca12c082ff70e44d3b7b8b3fbc8f347 Mon Sep 17 00:00:00 2001 From: adrien Date: Mon, 10 Mar 2014 17:27:51 +0100 Subject: [PATCH] fix cache when remove an user --- lib/private/user/database.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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; } /**