tqt
This commit is contained in:
parent
562b343063
commit
ea5be39a2e
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user