added error message when trying to sign up with gitlab using an email already used in the system

Этот коммит содержится в:
JoramWilander
2015-07-22 11:14:51 -04:00
родитель 62c0603c50
Коммит 7635e646a0

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

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