fix: mostly working ldap

This commit is contained in:
2025-05-10 20:03:17 -05:00
parent 6e55195e6f
commit 35a3e48ac9
8 changed files with 380 additions and 3 deletions

View File

@@ -22,6 +22,9 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
#[ORM\Column(type: 'integer')]
private int $id;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private ?string $username;
#[ORM\Column(type: 'string', length: 180, unique: true)]
private ?string $email;
@@ -88,7 +91,7 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
*/
public function getUserIdentifier(): string
{
return (string) $this->email;
return (string) $this->username ?? $this->email;
}
/**
@@ -241,4 +244,16 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
return $this;
}
public function getUsername(): ?string
{
return $this->username;
}
public function setUsername(?string $username): static
{
$this->username = $username;
return $this;
}
}