Private
Public Access
1
0

new: usr: Add opportunity to use profile picture. #4

This commit is contained in:
2026-04-13 15:50:28 +02:00
parent 98f6e8cb6e
commit 0c0b8ae920
23 changed files with 1952 additions and 212 deletions

View File

@@ -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);