replaceUserKeys() actually deletes the users keys -> update method name and doc-block
This commit is contained in:
parent
5e267589d4
commit
89223379ad
|
@ -296,7 +296,7 @@ class UserHooks implements IHook {
|
|||
public function postPasswordReset($params) {
|
||||
$password = $params['password'];
|
||||
|
||||
$this->keyManager->replaceUserKeys($params['uid']);
|
||||
$this->keyManager->deleteUserKeys($params['uid']);
|
||||
$this->userSetup->setupUser($params['uid'], $password);
|
||||
}
|
||||
|
||||
|
|
|
@ -557,9 +557,11 @@ class KeyManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* creat a backup of the users private and public key and then delete it
|
||||
*
|
||||
* @param string $uid
|
||||
*/
|
||||
public function replaceUserKeys($uid) {
|
||||
public function deleteUserKeys($uid) {
|
||||
$this->backupAllKeys('password_reset');
|
||||
$this->deletePublicKey($uid);
|
||||
$this->deletePrivateKey($uid);
|
||||
|
|
|
@ -251,7 +251,7 @@ class UserHooksTest extends TestCase {
|
|||
|
||||
public function testPostPasswordReset() {
|
||||
$this->keyManagerMock->expects($this->once())
|
||||
->method('replaceUserKeys')
|
||||
->method('deleteUserKeys')
|
||||
->with('testUser');
|
||||
|
||||
$this->userSetupMock->expects($this->once())
|
||||
|
|
Loading…
Reference in New Issue