diff options
Diffstat (limited to 'model/user.go')
-rw-r--r-- | model/user.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/model/user.go b/model/user.go index 2c2ba734b..7cb3d0b70 100644 --- a/model/user.go +++ b/model/user.go @@ -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 |