Memberpress: how to add users to groups upon Sign up

Sure, the topic is here: Manage group membership in Discourse with WP Discourse SSO. It describes how to use the WP Discourse add_user_to_discourse_group and remove_user_from_discourse_group functions. Assuming that you have your WordPress site configured to be the SSO provider site for Discourse, those are the functions that you should use to manage group memberships on Discourse.

The example that topic uses is with the PaidMembershipsPro plugin, but a similar approach should work with any well made WordPress membership plugin.

I’m going to add some details to the topic about how to manage group membership with the add_groups and remove_groups SSO parameters. For most cases, managing group membership by adding those parameters to the SSO payload will not be the best approach, because it requires users to logout and log back into Discourse before their group membership will be updated.

My hope is that in the near future there will be an out-of-the-box solution for linking Discourse with specific WordPress membership plugins. Currently it can only be done by adding a small amount of custom code to your WordPress site. If this isn’t something that you normally do, you may need to hire a developer to help with this.