Made error message clearer (#3318)
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
1d67825673
Коммит
661f221727
10
api/user.go
10
api/user.go
@@ -301,8 +301,14 @@ func CreateOAuthUser(c *Context, w http.ResponseWriter, r *http.Request, service
|
|||||||
}
|
}
|
||||||
|
|
||||||
if result := <-euchan; result.Err == nil {
|
if result := <-euchan; result.Err == nil {
|
||||||
c.Err = model.NewLocAppError("CreateOAuthUser", "api.user.create_oauth_user.already_attached.app_error",
|
authService := result.Data.(*model.User).AuthService
|
||||||
map[string]interface{}{"Service": service}, "email="+user.Email)
|
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
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1561,7 +1561,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "api.user.create_oauth_user.already_attached.app_error",
|
"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",
|
"id": "api.user.create_oauth_user.already_used.app_error",
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user