Continuing the discussion from Discourse API Documentation:
We’re using a
github user field for users to specify their GitHub username. I’d like to use Discourse’s API to make changes to a user, given their GitHub username. Is there an easy way to search for a user by a user field value?
Technically speaking, I can make a list of user field values:
- Loop through each user to
user.user_fields[GITHUB_USER_FIELD_ID]from each one
but that’s prohibitively inefficient. Any chance there’s a method like
to get all users with
user_fields containing “foo” that exists or is in the works?
I’m a Ruby n00b, so haven’t been able to find my answer in the source. I also haven’t been able to find a feature in Discourse that lets you search by user field value from which to reverse engineer the proper call.
Thanks for any advice,