diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2014-10-29 12:45:13 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-11-17 17:50:20 +0100 |
commit | f6efbfcf0bb76e16347748666d0c967ad839c5b2 (patch) | |
tree | 883c956761fe60e5a5ce1c5db3718103f553570a /apps/files_encryption/hooks/hooks.php | |
parent | 11ab457b7204b68d41337794ab16b71031dd592f (diff) | |
download | nextcloud-server-f6efbfcf0bb76e16347748666d0c967ad839c5b2.tar.gz nextcloud-server-f6efbfcf0bb76e16347748666d0c967ad839c5b2.zip |
listen to the post_passwordReset hook, backup the old keys and create a new key pair for the user
Diffstat (limited to 'apps/files_encryption/hooks/hooks.php')
-rw-r--r-- | apps/files_encryption/hooks/hooks.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php index 3a0a37c0a59..eadd2b64b80 100644 --- a/apps/files_encryption/hooks/hooks.php +++ b/apps/files_encryption/hooks/hooks.php @@ -263,6 +263,19 @@ class Hooks { }
}
+ /**
+ * after password reset we create a new key pair for the user
+ *
+ * @param array $params
+ */
+ public static function postPasswordReset($params) {
+ $uid = $params['uid'];
+ $password = $params['password'];
+
+ $util = new Util(new \OC\Files\View(), $uid);
+ $util->replaceUserKeys($password);
+ }
+
/*
* check if files can be encrypted to every user.
*/
|