Removed pointless attempt to verify a new user's username

Этот коммит содержится в:
hmhealey
2015-09-09 18:42:28 -04:00
родитель e6d4661aba
Коммит 7a9e709bd2
2 изменённых файлов: 1 добавлений и 9 удалений

Просмотреть файл

@@ -71,10 +71,7 @@ func createUser(c *Context, w http.ResponseWriter, r *http.Request) {
return
}
if !model.IsUsernameValid(user.Username) {
c.Err = model.NewAppError("createUser", "That username is invalid", "might be using a resrved username")
return
}
// the user's username is checked to be valid when they are saved to the database
user.EmailVerified = false

Просмотреть файл

@@ -335,11 +335,6 @@ func ComparePassword(hash string, password string) bool {
return err == nil
}
func IsUsernameValid(username string) bool {
return true
}
var validUsernameChars = regexp.MustCompile(`^[a-z0-9\.\-_]+$`)
var restrictedUsernames = []string{