Quite some work done here.

This commit is contained in:
Frank
2026-01-03 22:12:51 +01:00
parent af61a3b920
commit 5b6bfaf5ad
29 changed files with 658 additions and 41 deletions

View File

@@ -0,0 +1,26 @@
<?php
namespace App\Tech\Service;
use App\Tech\Entity\User;
use Symfony\Component\Security\Core\Exception\CustomUserMessageAuthenticationException;
use Symfony\Component\Security\Core\User\UserCheckerInterface;
use Symfony\Component\Security\Core\User\UserInterface;
class UserChecker implements UserCheckerInterface
{
public function checkPreAuth(UserInterface $user): void
{
if (!$user instanceof User) {
return;
}
if (!$user->isVerified()) {
throw new CustomUserMessageAuthenticationException('Your email address is not verified.');
}
}
public function checkPostAuth(UserInterface $user): void
{
}
}