setup registration and migration
This commit is contained in:
parent
7948cda40d
commit
dfff8adb8f
13 changed files with 699 additions and 1 deletions
|
@ -4,11 +4,13 @@ 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\UserInterface;
|
||||
|
||||
/**
|
||||
* @ORM\Entity(repositoryClass=UserRepository::class)
|
||||
* @ORM\Table(name="`user`")
|
||||
* @UniqueEntity(fields={"email"}, message="There is already an account with this email")
|
||||
*/
|
||||
class User implements UserInterface
|
||||
{
|
||||
|
@ -35,6 +37,11 @@ class User implements UserInterface
|
|||
*/
|
||||
private $password;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="boolean")
|
||||
*/
|
||||
private $isVerified = false;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
|
@ -115,4 +122,16 @@ class User implements UserInterface
|
|||
// If you store any temporary, sensitive data on the user, clear it here
|
||||
// $this->plainPassword = null;
|
||||
}
|
||||
|
||||
public function isVerified(): bool
|
||||
{
|
||||
return $this->isVerified;
|
||||
}
|
||||
|
||||
public function setIsVerified(bool $isVerified): self
|
||||
{
|
||||
$this->isVerified = $isVerified;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue