From: Morris Jobke Date: Fri, 5 Dec 2014 15:34:54 +0000 (+0100) Subject: introduce deleteAllUserValues X-Git-Tag: v8.0.0alpha1~144^2~7 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=719008836d5254c6fa3975c5044d1c6a811bc124;p=nextcloud-server.git introduce deleteAllUserValues --- 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); }