use username
This commit is contained in:
parent
5a32d90adc
commit
d74c283830
6 changed files with 58 additions and 8 deletions
|
@ -42,6 +42,11 @@ class User implements UserInterface
|
|||
*/
|
||||
private $isVerified = false;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255)
|
||||
*/
|
||||
private $username;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
|
@ -66,7 +71,7 @@ class User implements UserInterface
|
|||
*/
|
||||
public function getUsername(): string
|
||||
{
|
||||
return (string) $this->email;
|
||||
return (string) $this->username;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -134,4 +139,11 @@ class User implements UserInterface
|
|||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setUsername(string $username): self
|
||||
{
|
||||
$this->username = $username;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue