Commit c013bcbb authored by Vincent Petry's avatar Vincent Petry Committed by GitHub
Browse files

Use preDelete hook to delete encryption keys (#26938)

Because we sometimes need to mount the user's home before deleting
encryption keys, this must happen in a preDelete hook because the
postDelete is too late. In postDelete the user's home already doesn't
exist any more and cannot be mounted.
parent 4fcffcf3
......@@ -137,9 +137,9 @@ class UserHooks implements IHook {
......@@ -194,7 +194,7 @@ class UserHooks implements IHook {
* @param array $params : uid, password
* @note This method should never be called for users using client side encryption
public function postDeleteUser($params) {
public function preDeleteUser($params) {
if (App::isEnabled('encryption')) {
......@@ -108,12 +108,12 @@ class UserHooksTest extends TestCase {
public function testPostDeleteUser() {
public function testPreDeleteUser() {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment