- Login fonctionnel

This commit is contained in:
2025-01-29 14:11:28 +01:00
parent ae09474b49
commit ced8d321bc
4 changed files with 31 additions and 24 deletions

View File

@ -31,6 +31,10 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
#[ORM\Column(length: 255)]
private ?string $lastName = null;
#[ORM\Column(type: "json")]
private array $roles = [];
public function getId(): ?int
{
return $this->id;
@ -103,16 +107,26 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
public function getRoles(): array
{
// TODO: Implement getRoles() method.
$roles = $this->roles;
if (empty($roles)) {
$roles[] = 'ROLE_USER';
}
return $roles;
}
public function eraseCredentials(): void
{
// TODO: Implement eraseCredentials() method.
}
public function getUserIdentifier(): string
{
// TODO: Implement getUserIdentifier() method.
return $this->email; // Ou $this->pseudo si tu préfères utiliser le pseudo
}
}