- Status: {% if user.isVerified %}✓ Verified{% else %}⏳ Awaiting Email Verification{% endif %}
- Email Verified: {% if user.isVerified %}Yes{% else %}No - activation link sent{% endif %} -
From 4bf7ac358d80503e273e01f8c0b46506c700e646 Mon Sep 17 00:00:00 2001 From: Lang <7system7@gmail.com> Date: Mon, 27 Jul 2026 18:16:08 +0200 Subject: [PATCH] chg: dev: remove registration notification #14 --- src/Controller/SecurityController.php | 3 - ...endUserRegistrationNotificationService.php | 75 --------------- .../user_registration_notification.html.twig | 92 ------------------- 3 files changed, 170 deletions(-) delete mode 100644 src/Service/Email/SendUserRegistrationNotificationService.php delete mode 100644 templates/emails/user_registration_notification.html.twig diff --git a/src/Controller/SecurityController.php b/src/Controller/SecurityController.php index 729ed64..2953f77 100644 --- a/src/Controller/SecurityController.php +++ b/src/Controller/SecurityController.php @@ -18,7 +18,6 @@ use App\Repository\UserRepository; use App\Service\Email\SendActivationEmailService; use App\Service\Email\SendPasswordResetEmailService; use App\Service\Email\SendUserActivationNotificationService; -use App\Service\Email\SendUserRegistrationNotificationService; use DateTime; use Doctrine\ORM\EntityManagerInterface; use LogicException; @@ -55,7 +54,6 @@ class SecurityController extends AbstractController private readonly SendActivationEmailService $activationEmail, private readonly SendPasswordResetEmailService $passwordResetEmail, private readonly SendUserActivationNotificationService $activationNotificationEmail, - private readonly SendUserRegistrationNotificationService $registrationNotificationEmail, ) { } @@ -112,7 +110,6 @@ class SecurityController extends AbstractController } $this->activationEmail->send($user, $activationUrl); - $this->registrationNotificationEmail->send($user, new DateTime()); $this->addFlash('verify_email', $user->email); diff --git a/src/Service/Email/SendUserRegistrationNotificationService.php b/src/Service/Email/SendUserRegistrationNotificationService.php deleted file mode 100644 index 8f0a4c6..0000000 --- a/src/Service/Email/SendUserRegistrationNotificationService.php +++ /dev/null @@ -1,75 +0,0 @@ - - * @category Class - * @license https://www.gnu.org/licenses/lgpl-3.0.en.html GNU Lesser General Public License - * @link www.splendidbear.org - * @since 2026. 04. 20. - */ -readonly final class SendUserRegistrationNotificationService -{ - public function __construct( - #[Autowire(env: 'APP_CONTACT_MAIL_ADDRESS')] - private string $appContactMailAddress, - private LoggerInterface $logger, - private MailerInterface $mailer, - ) { - } - - public function send(User $user, DateTime $registeredAt): void - { - try { - $this->mailer->send( - new TemplatedEmail() - ->from('noreply@mineseeker.hu') - ->to($this->appContactMailAddress) - ->subject("🎉 New User Registration: {$user->getUsername()}") - ->htmlTemplate('emails/user_registration_notification.html.twig') - ->context([ - 'user' => $user, - 'registeredAt' => $registeredAt, - ]) - ); - } catch (TransportExceptionInterface|Exception $e) { - $this->logger->error("Failed to send user registration notification: {$e->getMessage()}", [ - 'exception' => $e, - 'user' => $user->getUsername(), - ]); - throw new RuntimeException("Failed to send user registration notification: {$e->getMessage()}"); - } - } -} - diff --git a/templates/emails/user_registration_notification.html.twig b/templates/emails/user_registration_notification.html.twig deleted file mode 100644 index fc4ffbe..0000000 --- a/templates/emails/user_registration_notification.html.twig +++ /dev/null @@ -1,92 +0,0 @@ - - -
- -