Этот коммит содержится в:
David Lu
2016-06-14 05:59:55 -07:00
коммит произвёл Joram Wilander
родитель 1d67825673
Коммит 661f221727
2 изменённых файлов: 9 добавлений и 3 удалений

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

@@ -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
}