Removed pointless attempt to verify a new user's username

This commit is contained in:
hmhealey
2015-09-09 18:42:28 -04:00
parent e6d4661aba
commit 7a9e709bd2
2 changed files with 1 additions and 9 deletions

View File

@@ -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

View File

@@ -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{