diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/web.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/web/web.go b/web/web.go index 15c978ff1..ef2bae624 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().GetByAuth(team.Id, user.AuthData, service); result.Err == nil { + c.Err = model.NewAppError("signupCompleteOAuth", "This "+service+" account has already been used to sign up for team "+team.DisplayName, "email="+user.Email) + 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 |