From 0b3ddbed686f345e80dee1fbc8b3567da5d7b85a Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Thu, 7 Aug 2014 15:26:09 +0200 Subject: add logout hook to remove keys from session --- apps/files_encryption/hooks/hooks.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'apps/files_encryption/hooks') diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php index 667be8b9802..bd2268aa048 100644 --- a/apps/files_encryption/hooks/hooks.php +++ b/apps/files_encryption/hooks/hooks.php @@ -122,6 +122,14 @@ class Hooks { return $result; } + /** + * remove keys from session during logout + */ + public static function logout() { + $session = new \OCA\Encryption\Session(new \OC\Files\View()); + $session->removeKeys(); + } + /** * setup encryption backend upon user created * @note This method should never be called for users using client side encryption @@ -173,7 +181,6 @@ class Hooks { * @param array $params keys: uid, password */ public static function setPassphrase($params) { - if (\OCP\App::isEnabled('files_encryption') === false) { return true; } -- cgit v1.2.3