summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/user.go10
-rw-r--r--i18n/en.json2
2 files changed, 9 insertions, 3 deletions
diff --git a/api/user.go b/api/user.go
index aae3dffa5..0ab64d830 100644
--- a/api/user.go
+++ b/api/user.go
@@ -301,8 +301,14 @@ func CreateOAuthUser(c *Context, w http.ResponseWriter, r *http.Request, service
}
if result := <-euchan; result.Err == nil {
- c.Err = model.NewLocAppError("CreateOAuthUser", "api.user.create_oauth_user.already_attached.app_error",
- map[string]interface{}{"Service": service}, "email="+user.Email)
+ authService := result.Data.(*model.User).AuthService
+ if authService == "" {
+ c.Err = model.NewLocAppError("CreateOAuthUser", "api.user.create_oauth_user.already_attached.app_error",
+ map[string]interface{}{"Service": service, "Auth": model.USER_AUTH_SERVICE_EMAIL}, "email="+user.Email)
+ } else {
+ c.Err = model.NewLocAppError("CreateOAuthUser", "api.user.create_oauth_user.already_attached.app_error",
+ map[string]interface{}{"Service": service, "Auth": authService}, "email="+user.Email)
+ }
return nil
}
diff --git a/i18n/en.json b/i18n/en.json
index 1589dd4ac..0f24ff03a 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -1561,7 +1561,7 @@
},
{
"id": "api.user.create_oauth_user.already_attached.app_error",
- "translation": "An existing user is already attached to your {{.Service}} account"
+ "translation": "There is already an account associated with that email address using a sign in method other than {{.Service}}. Please sign in using {{.Auth}}."
},
{
"id": "api.user.create_oauth_user.already_used.app_error",