diff --git a/config/packages/security.yaml b/config/packages/security.yaml index 542c62f..cf656ab 100644 --- a/config/packages/security.yaml +++ b/config/packages/security.yaml @@ -36,6 +36,7 @@ security: stateless: true oauth2: true main: + user_checker: App\Security\UserChecker lazy: true provider: app_user_provider form_login: diff --git a/src/Security/UserChecker.php b/src/Security/UserChecker.php new file mode 100644 index 0000000..b7f4ca4 --- /dev/null +++ b/src/Security/UserChecker.php @@ -0,0 +1,23 @@ +isDeleted()) { + throw new CustomUserMessageAccountStatusException('Votre compte a été supprimé.'); + } + } +} \ No newline at end of file