new: usr: Add opportunity to use profile picture. #4
This commit is contained in:
@@ -75,6 +75,9 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface, TotpTwo
|
||||
#[Column(type: Types::JSON, nullable: true)]
|
||||
private ?array $backupCodes = [];
|
||||
|
||||
#[Column(length: 255, nullable: true)]
|
||||
private ?string $avatarPath = null;
|
||||
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
@@ -180,7 +183,16 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface, TotpTwo
|
||||
return $this;
|
||||
}
|
||||
|
||||
// --- TotpTwoFactorInterface ---
|
||||
public function getAvatarPath(): ?string
|
||||
{
|
||||
return $this->avatarPath;
|
||||
}
|
||||
|
||||
public function setAvatarPath(?string $avatarPath): self
|
||||
{
|
||||
$this->avatarPath = $avatarPath;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function isTotpAuthenticationEnabled(): bool
|
||||
{
|
||||
@@ -211,8 +223,6 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface, TotpTwo
|
||||
return $this;
|
||||
}
|
||||
|
||||
// --- BackupCodeInterface ---
|
||||
|
||||
public function isBackupCode(string $code): bool
|
||||
{
|
||||
return \in_array($code, $this->backupCodes ?? [], true);
|
||||
|
||||
Reference in New Issue
Block a user