diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2014-08-07 15:26:09 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2014-08-07 15:29:35 +0200 |
commit | 0b3ddbed686f345e80dee1fbc8b3567da5d7b85a (patch) | |
tree | b42d7981d23331fe74f2f174f5afa70548aca27a /apps/files_encryption/hooks | |
parent | d2365afad6c10a2b365b13296065e99bf13d704f (diff) | |
download | nextcloud-server-0b3ddbed686f345e80dee1fbc8b3567da5d7b85a.tar.gz nextcloud-server-0b3ddbed686f345e80dee1fbc8b3567da5d7b85a.zip |
add logout hook to remove keys from session
Diffstat (limited to 'apps/files_encryption/hooks')
-rw-r--r-- | apps/files_encryption/hooks/hooks.php | 9 |
1 files changed, 8 insertions, 1 deletions
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 @@ -123,6 +123,14 @@ class Hooks { }
/**
+ * 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;
}
|