diff options
Diffstat (limited to 'apps/files_trashbin/lib/hooks.php')
-rw-r--r-- | apps/files_trashbin/lib/hooks.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/files_trashbin/lib/hooks.php b/apps/files_trashbin/lib/hooks.php index 9081706a2c5..f1df1d7ec77 100644 --- a/apps/files_trashbin/lib/hooks.php +++ b/apps/files_trashbin/lib/hooks.php @@ -42,4 +42,18 @@ class Hooks { Trashbin::move2trash($path); } } + + /** + * @brief clean up user specific settings if user gets deleted + * @param array with uid + * + * This function is connected to the pre_deleteUser signal of OC_Users + * to remove the used space for the trash bin stored in the database + */ + public static function deleteUser_hook($params) { + if( \OCP\App::isEnabled('files_trashbin') ) { + $uid = $params['uid']; + Trashbin::deleteUser($uid); + } + } } |