Merge pull request #1 from GoteoFoundation/feature/user_entity

Add new fields to user
This commit is contained in:
2024-03-08 12:45:02 +01:00
committed by GitHub
+60
View File
@@ -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;
}
}