diff --git a/src/Security/EmailVerifier.php b/src/Security/EmailVerifier.php deleted file mode 100644 index 1d45afc..0000000 --- a/src/Security/EmailVerifier.php +++ /dev/null @@ -1,54 +0,0 @@ -verifyEmailHelper->generateSignature( - routeName: $verifyEmailRouteName, - userId: $user->getId(), - userEmail: $user->getEmail(), - extraParams: ['id' => $user->getId()] - ); - - $context = $email->getContext(); - $context['signedUrl'] = $signatureComponents->getSignedUrl(); - $context['expiresAtMessageKey'] = $signatureComponents->getExpirationMessageKey(); - $context['expiresAtMessageData'] = $signatureComponents->getExpirationMessageData(); - - $email->context(context: $context); - - $this->mailer->send(message: $email); - } - - /** - * @throws VerifyEmailExceptionInterface - */ - public function handleEmailConfirmation(Request $request, User /*UserInterface*/ $user): void - { - $this->verifyEmailHelper->validateEmailConfirmation(signedUrl: $request->getUri(), userId: $user->getId(), userEmail: $user->getEmail()); - - $user->setIsVerified(isVerified: true); - - $this->entityManager->persist(entity: $user); - $this->entityManager->flush(); - } -}