Unverified Commit 6eb2adc5 authored by Vincent Petry's avatar Vincent Petry
Browse files

Revert "Use preDelete hook to delete encryption keys"

This reverts commit 4559dad3e421f330eb8cbc718aa19e573a5ae2f7.
parent 1f7167a9
......@@ -137,9 +137,9 @@ class UserHooks implements IHook {
'postCreateUser');
OCUtil::connectHook('OC_User',
'pre_deleteUser',
'post_deleteUser',
$this,
'preDeleteUser');
'postDeleteUser');
}
}
......@@ -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 preDeleteUser($params) {
public function postDeleteUser($params) {
if (App::isEnabled('encryption')) {
$this->keyManager->deletePublicKey($params['uid']);
......
......@@ -108,12 +108,12 @@ class UserHooksTest extends TestCase {
$this->assertTrue(true);
}
public function testPreDeleteUser() {
public function testPostDeleteUser() {
$this->keyManagerMock->expects($this->once())
->method('deletePublicKey')
->with('testUser');
$this->instance->preDeleteUser($this->params);
$this->instance->postDeleteUser($this->params);
$this->assertTrue(true);
}
......
Supports Markdown
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