Revert "Usernames must start with a letter (#5581)"
This reverts commit 2e911b77c3.
Этот коммит содержится в:
@@ -10,7 +10,6 @@ import (
|
||||
"net/http"
|
||||
"regexp"
|
||||
"strings"
|
||||
"unicode"
|
||||
"unicode/utf8"
|
||||
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
@@ -152,7 +151,7 @@ func (u *User) PreSave() {
|
||||
}
|
||||
|
||||
if u.Username == "" {
|
||||
u.Username = "n" + NewId()
|
||||
u.Username = NewId()
|
||||
}
|
||||
|
||||
if u.AuthData != nil && *u.AuthData == "" {
|
||||
@@ -582,10 +581,6 @@ func IsValidUsername(s string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
if !unicode.IsLetter(rune(s[0])) {
|
||||
return false
|
||||
}
|
||||
|
||||
for _, restrictedUsername := range restrictedUsernames {
|
||||
if s == restrictedUsername {
|
||||
return false
|
||||
|
||||
Ссылка в новой задаче
Block a user