isIsactive()) { throw new CustomUserMessageAccountStatusException('Your user account no longer exists.'); } } public function checkPostAuth(UserInterface $user): void { if (!$user instanceof User) { return; } if (!$user->isIsactive()) { throw new AccountExpiredException('...'); } } }