From ea5be39a2ed00f657ac8b47f69d9366af458dbe1 Mon Sep 17 00:00:00 2001 From: ALLAVENA--VALETTE Romain Date: Thu, 10 Oct 2024 14:47:52 +0200 Subject: [PATCH] tqt --- src/Entity/User.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Entity/User.php b/src/Entity/User.php index 6706db8..4536d5c 100644 --- a/src/Entity/User.php +++ b/src/Entity/User.php @@ -4,14 +4,12 @@ namespace App\Entity; use App\Repository\UserRepository; use Doctrine\ORM\Mapping as ORM; -use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface; use Symfony\Component\Security\Core\User\UserInterface; #[ORM\Entity(repositoryClass: UserRepository::class)] -#[ORM\Table(name: 'userApp')] +#[ORM\Table(name: '`user`')] #[ORM\UniqueConstraint(name: 'UNIQ_IDENTIFIER_NICKNAME', fields: ['nickname'])] -#[UniqueEntity(fields: ['nickname'], message: 'Il y a déjà un utilisateur à ce nom')] class User implements UserInterface, PasswordAuthenticatedUserInterface { #[ORM\Id] @@ -47,7 +45,7 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface private ?string $address = null; #[ORM\Column(length: 255)] - private ?string $email = null; + private ?string $mail = null; public function getId(): ?int { @@ -172,15 +170,17 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface return $this; } - public function getEmail(): ?string + public function getMail(): ?string { - return $this->email; + return $this->mail; } - public function setEmail(string $email): static + public function setMail(string $mail): static { - $this->email = $email; + $this->mail = $mail; return $this; } -} \ No newline at end of file +} + +