more fixes
This commit is contained in:
@@ -23,7 +23,7 @@ final class UsernamePolicy
|
||||
|
||||
public static function regex(): string
|
||||
{
|
||||
return (string) config('usernames.regex', '/^[a-zA-Z0-9_-]+$/');
|
||||
return (string) config('usernames.regex', '/^[a-zA-Z0-9_]{3,20}$/');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -31,7 +31,12 @@ final class UsernamePolicy
|
||||
*/
|
||||
public static function reserved(): array
|
||||
{
|
||||
return array_values(array_unique(array_map(static fn (string $v): string => strtolower(trim($v)), (array) config('usernames.reserved', []))));
|
||||
$pool = [
|
||||
...(array) config('usernames.reserved', []),
|
||||
...(array) config('skinbase.reserved_usernames', []),
|
||||
];
|
||||
|
||||
return array_values(array_unique(array_map(static fn (string $v): string => strtolower(trim($v)), $pool)));
|
||||
}
|
||||
|
||||
public static function normalize(string $value): string
|
||||
|
||||
Reference in New Issue
Block a user