summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--web/web.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/web/web.go b/web/web.go
index b0b926cd8..15c978ff1 100644
--- a/web/web.go
+++ b/web/web.go
@@ -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")