Conditional Automation for Approval of New Users?

AI-generated summary

In a private Discourse forum for volunteers, Dena asks if it’s possible to automatically approve new users who meet specific profile conditions (e.g., those synced from their volunteer platform via a global user identifier), while keeping manual approval for others. pfaffman clarifies whether the sync uses the API — if so, approval can be automated alongside user creation. Frully confirms their organization does this: their membership portal auto-creates and approves forum users upon sign-up, matching by email, assigning usernames and groups, and overwriting existing accounts if needed — while letting non-members sign up for preview, which are manually approved. They share a code reference showing how they trigger the API steps. pfaffman suggests adding approval to that code or, as a simpler alternative, relaxing the approval requirement to see if issues arise. The goal is to prevent duplicates and maintain sync integrity while reducing manual work for verified volunteers.

Hello,

We have a private Discourse forum accessible only to volunteers. We have a sync set up with our volunteer platform where new users are added automatically to Discourse when they join as a volunteer.

We also have it set up to approve all new users because people try to join from elsewhere or create duplicate accounts (which we don’t want because we need the platforms to maintain their sync)

My question: is it possible to automatically approve new users that meet certain profile conditions while maintaining the manual approval for others? Users created via the sync will always have a global user identifier field in their Discourse profile filled out so can be easily identified.

Thank you! Let me know if I can expand on anything above.
Dena

What does that mean?

If you’re creating those users with the API then you could also approve them with the API at the same time. If you mean that they are creating their own account and doing something to make them autovalidated, then it’ll probably take a plugin.

We do exactly this - our member (in person not-for-profit group) portal manages the accounts of forum members on sign-up. There are a bunch of annoying edge cases for duplicates as you mention.

So as to not be confusing: joining not-for-profit as ‘membership’ where forum is ‘user’.

Sign up for membership >> (if not exist forum user by membership.email) create forum user, set username to membership.discourseUsername, add to groups for permissions, and approve/activate account immediately.
Sometimes people join the forum to see what our community is about before becoming a member, those are manually approved.
On membership join >> (if exist forum user by membership.email), trample the forum user with the membership.email as above. It’s a strange case but there are no non-member users whose accounts would be compromised by a paying member joining the organization

Apologies that our external app is gigantic so you may need to dig to see how we pull the trigger on all those steps/api requests.

So just add the new user approval to that code.

The lazy approach would be to not insist on approving all users and see if that causes problems.