mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-07 17:04:30 +02:00
Allow usernames to contain @-signs as long as it is not at the begininng
This allows to use email addresses as usernames and fixes issue #772
This commit is contained in:
parent
ca8ad760d7
commit
b1ba26e0b9
3 changed files with 3 additions and 3 deletions
|
@ -256,7 +256,7 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe
|
|||
protected ?string $password = null;
|
||||
|
||||
#[Assert\NotBlank]
|
||||
#[Assert\Regex('/^[\w\.\+\-\$]+$/', message: 'user.invalid_username')]
|
||||
#[Assert\Regex('/^[\w\.\+\-\$]+[\w\.\+\-\$\@]*$/', message: 'user.invalid_username')]
|
||||
#[Groups(['user:read'])]
|
||||
protected string $name = '';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue