みなさん、こんにちは!Discourse をコミュニティの主要なコミュニケーション手段として使うのはまだ初心者で、いくつかのことがどう進めばいいか迷っています。
まず、私が何を実現したいのかをお伝えして、ご理解いただければと思います。
私のコミュニティはゲーム中心のもので、Discourse をコミュニティ全体のユーザー管理の基盤として使いたいです。Steam でログインしたユーザーについて、Discourse 上のランクを Steam ゲームサーバーと同期させようとしています。
Discourse API を使って、Steam ID でユーザーを効率的に検索し、そのユーザーが属するグループを取得するにはどうすればよいでしょうか?ご助言いただければ幸いです。API の使用にはある程度慣れているのですが、これがすぐに実現可能かどうか、あるいは最適なアプローチが何か見当がつかないでいます。
これ私もやりたいです。答えはありませんが、以下を参照してください:
The Discourse user’s external_id will match the WP user_id.
I’m not interested in migrating from Discourse, but I am interested in this. Can you elaborate where this field is found? Using Data Explorer , I don’t see it under the users table or any other table.
I’m not sure in which table it’s stored, but external_id is part of the users export file from
/admin/users/list/active → Export
EDIT: found it - it’s in the single_sign_on_records table.
ユーザー ID と外部 ID の両方を含む CSV ファイルを /admin/users/list/active から「エクスポート」してダウンロードできます。これは API 呼び出しではありませんが、参考になるかもしれません。
「いいね!」 1
はい、それは確かに正しい方向への一歩ですね。ただ、外部識別子で人物を検索するためのAPIクエリ方法が見当たりません。理想的にはDiscord IDとSteam IDの両方で検索できるようにしたいのですが、まずはSteam IDの解決に集中したいと考えています。
david
(David Taylor)
2021 年 3 月 30 日午後 3:56
4
Discord と Steam の両方のログインにこれを使用できるはずです:
This guide explains how to find a Discourse user based on their external_id from an identity provider using API calls.
Required user level: Administrator
When using an external authentication system, Discourse keeps track of two user ids: the Discourse user_id, and an external_id from the identity provider. If you need to lookup a Discourse user based on the external_id, this howto article is for you! Below, you’ll learn how to perform this operation.
API S…
「いいね!」 3
本当にありがとうございます。今すぐ試してみましたが、まさに必要な通りに動作しました!あとはゲーム内の実装を書くだけです。
「いいね!」 1
system
(system)
クローズされました:
2021 年 4 月 29 日午後 5:36
6
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.