Get list of invited users

Because required custom fields are not required for invites, a client wants to know who’s been invited. I don’t see an easy way to get that information. I thought that perhaps clicking “invited users” on the admin user page would do that, but it includes just my invites, not all invites.

Is there a way to do this? (Other than data explorer?)

1 Like

This is a question for @techAPJ

What’s the issue with using data explorer? A simple data explorer query for this will list all the invited users in properly formatted (hyperlinked) UI and the result can be exported as needed.

Here is the data explorer query if you are interested:

SELECT user_id,
       invited_by_id as invited_by_user_id,
       redeemed_at
FROM invites
WHERE redeemed_at IS NOT NULL
ORDER BY redeemed_at DESC
8 Likes

I’d already written a query for data explorer, I was just surprised that there wasn’t a way to do it without the data explorer. Since invites are in their own table, it’s not rocket science to write the query, but your query taught me that I could append _user_id to something to make it use the user displayer thing. That’s cool. Thanks.

6 Likes

Not anymore. :slight_smile:

https://github.com/discourse/discourse/commit/b9c94aa234fb6198a163ca2e990a3e0b209fbf90

Demo:

10 Likes

Heads up, this one no longer seems to work, however, the one below works for me:

https://meta.discourse.org/t/list-of-users-who-signed-up-via-invitations/224871/6