Bonjour à tous,
Je vous écris parce que malgrès mes efforts je ne trouve pas de solutions pour intégrer un systéme de banissement dans mon espace membre sous Symfony.
J'ai tout bétement créer dans les entités un champ "ban" qui sera de 0 si le membre n'est pas bani et de 1 si il l'est.
#[ORM\Column]
private ?int $ban = null;
public function getBan(): ?int
{
return $this->ban;
}
public function setBan(int $ban): static
{
$this->ban = $ban;
return $this;
}
Pour ce qui est du "login" :
public function index(AuthenticationUtils $authenticationUtils): Response {
// get the login error if there is one
$error = $authenticationUtils->getLastAuthenticationError();
// last username entered by the user
$lastUsername = $authenticationUtils->getLastUsername();
return $this->render('login/index.html.twig', [
'last_username' => $lastUsername,
'error' => $error,
]);
}
J'ai fait plusieurs tentatives sous différentes approches mais rien n'y fait... C'est pour ca que je m'en remets à vous...
En vous remerciant,
Luti.