MAPG-142 modify UserConfirmationRepository to return only one confirmation for user

(it is not possible for an user to have multiple)
This commit is contained in:
bence committed 2020-07-05 13:33:02 +02:00
1 parent 631582a912
commit 6cafac1b65
2 files changed
+4 -5

No files matched your search

+2 -1
View File
@@ -184,7 +184,8 @@ class UserController implements ISecured
\Container::$dbConnection->startTransaction();
foreach ($this->userConfirmationRepository->getByUser($user) as $userConfirmation) {
$userConfirmation = $this->userConfirmationRepository->getByUser($user);
if ($userConfirmation !== null) {
$this->pdm->deleteFromDb($userConfirmation);
}