Merge pull request #1 from GoteoFoundation/feature/user_entity
Add new fields to user
This commit is contained in:
@@ -84,6 +84,18 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
|
||||
#[ORM\OneToMany(mappedBy: 'ownedBy', targetEntity: AccessToken::class, orphanRemoval: true)]
|
||||
private Collection $accessTokens;
|
||||
|
||||
#[ORM\Column]
|
||||
private ?bool $active = null;
|
||||
|
||||
#[ORM\Column]
|
||||
private ?bool $confirmed = null;
|
||||
|
||||
#[ORM\Column(length: 255, nullable: true)]
|
||||
private ?string $avatar = null;
|
||||
|
||||
#[ORM\Column(length: 255, nullable: true)]
|
||||
private ?string $name = null;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->accounting = new Accounting();
|
||||
@@ -243,4 +255,52 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function isActive(): ?bool
|
||||
{
|
||||
return $this->active;
|
||||
}
|
||||
|
||||
public function setActive(bool $active): static
|
||||
{
|
||||
$this->active = $active;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function isConfirmed(): ?bool
|
||||
{
|
||||
return $this->confirmed;
|
||||
}
|
||||
|
||||
public function setConfirmed(bool $confirmed): static
|
||||
{
|
||||
$this->confirmed = $confirmed;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getAvatar(): ?string
|
||||
{
|
||||
return $this->avatar;
|
||||
}
|
||||
|
||||
public function setAvatar(?string $avatar): static
|
||||
{
|
||||
$this->avatar = $avatar;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getName(): ?string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function setName(?string $name): static
|
||||
{
|
||||
$this->name = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user