isIsactive()) { throw new CustomUserMessageAccountStatusException('Votre compte a été désactivé'); } } public function checkPostAuth(UserInterface $user): void { if (!$user instanceof User) { return; } if (!$user->isIsactive()) { throw new AccountExpiredException('...'); } } }