From 719008836d5254c6fa3975c5044d1c6a811bc124 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 5 Dec 2014 16:34:54 +0100 Subject: [PATCH] introduce deleteAllUserValues --- lib/private/allconfig.php | 9 +++++++++ lib/public/iconfig.php | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/lib/private/allconfig.php b/lib/private/allconfig.php index 71393a0d163..173aac6ad65 100644 --- a/lib/private/allconfig.php +++ b/lib/private/allconfig.php @@ -152,4 +152,13 @@ class AllConfig implements \OCP\IConfig { public function deleteUserValue($userId, $appName, $key) { \OC_Preferences::deleteKey($userId, $appName, $key); } + + /** + * Delete all user values + * + * @param string $userId the userId of the user that we want to remove all values from + */ + public function deleteAllUserValues($userId) { + \OC_Preferences::deleteUser($userId); + } } diff --git a/lib/public/iconfig.php b/lib/public/iconfig.php index 671ae92234b..fe155cc61b0 100644 --- a/lib/public/iconfig.php +++ b/lib/public/iconfig.php @@ -141,4 +141,11 @@ interface IConfig { * @param string $key the key under which the value is being stored */ public function deleteUserValue($userId, $appName, $key); + + /** + * Delete all user values + * + * @param string $userId the userId of the user that we want to remove all values from + */ + public function deleteAllUserValues($userId); } -- 2.39.5