mirror of
https://github.com/mattermost/mattermost.git
synced 2026-09-24 16:05:00 +08:00
added error message when trying to sign up with gitlab using an email already used in the system
This commit is contained in:
@@ -499,6 +499,11 @@ func signupCompleteOAuth(c *api.Context, w http.ResponseWriter, r *http.Request)
|
||||
return
|
||||
}
|
||||
|
||||
if result := <-api.Srv.Store.User().GetByEmail(team.Id, user.Email); result.Err == nil {
|
||||
c.Err = model.NewAppError("signupCompleteOAuth", "Team "+team.DisplayName+" already has a user with the email address attached to your "+service+" account", "email="+user.Email)
|
||||
return
|
||||
}
|
||||
|
||||
user.TeamId = team.Id
|
||||
|
||||
page := NewHtmlTemplatePage("signup_user_oauth", "Complete User Sign Up")
|
||||
|
||||
Reference in New Issue
Block a user