fix: email validation. Fixes #49

This commit is contained in:
Maël Gangloff
2025-03-24 20:36:01 +01:00
parent 6fc4456793
commit b33a979556
2 changed files with 4 additions and 4 deletions

View File

@@ -75,6 +75,9 @@ class RegistrationController extends AbstractController
)
);
$this->em->persist($user);
$this->em->flush();
if (false === (bool) $this->getParameter('registration_verify_email')) {
$user->setVerified(true);
} else {
@@ -94,9 +97,6 @@ class RegistrationController extends AbstractController
]);
}
$this->em->persist($user);
$this->em->flush();
$this->logger->info('A new user has registered ({username}).', [
'username' => $user->getUserIdentifier(),
]);