feat: skip username restriction for new users coming from OAuth providers. (#1225)

This commit is contained in:
Gucheng
2022-10-17 18:01:01 +08:00
committed by GitHub
parent 50a52de856
commit 146aec9ee8
3 changed files with 9 additions and 16 deletions

View File

@ -203,12 +203,6 @@ func (c *ApiController) Signup() {
}
}
msg = object.CheckUsername(user.Name)
if msg != "" {
c.ResponseError(msg)
return
}
affected := object.AddUser(user)
if !affected {
c.ResponseError(fmt.Sprintf("Failed to create user, user information is invalid: %s", util.StructToJson(user)))