mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Removed pointless attempt to verify a new user's username
This commit is contained in:
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user