diff --git a/src/Controller/UserController.php b/src/Controller/UserController.php index 25d14e9..9314dd7 100644 --- a/src/Controller/UserController.php +++ b/src/Controller/UserController.php @@ -1,18 +1,16 @@ request = $request; $this->pdm = new PersistentDataManager(); $this->userConfirmationRepository = new UserConfirmationRepository(); + $this->userPasswordResetterRepository = new UserPasswordResetterRepository(); } public function authorize(): bool @@ -181,6 +182,10 @@ class UserController implements ISecured $this->pdm->deleteFromDb($userConfirmation); } + foreach ($this->userPasswordResetterRepository->getByUser($user) as $userPasswordResetter) { + $this->pdm->deleteFromDb($userPasswordResetter); + } + $this->pdm->deleteFromDb($user); \Container::$dbConnection->commit();