# Automatisch WordPress-gebruiker toevoegen aan Discourse-groep

**URL:** https://meta.discourse.org/t/automatically-add-wordpress-user-to-discourse-group/293321
**Category:** WordPress
**Created:** [29 januari 2024 om 16:21 UTC](https://meta.discourse.org/t/automatically-add-wordpress-user-to-discourse-group/293321 "2024-01-29T16:21:50Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![IreneT](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/irenet/32/305959_2.png) [@IreneT](https://meta.discourse.org/u/IreneT)
#### Post date: [29 januari 2024 om 16:21 UTC](https://meta.discourse.org/t/automatically-add-wordpress-user-to-discourse-group/293321/1 "2024-01-29T16:21:50Z")

</div>

I have WP-Discourse configured with Discourse and the Wordpress membership plugin “Wishlist Member” with a functioning community. Currently, we have a general group (Group: General) that all of our members are automatically added to when they register for the community. We want to change which group the new members are automatically added to, which will be a “temporary” group (Group: Onboarding) that members go into automatically when they first sign up.

I can’t seem to find how our new members are automatically added to Group: General, especially since we have multiple Discourse Groups. It seems “General” is the default for new Discourse  
members OR its being pushed through as an “add to Group” request from Wishlist/WP-Discourse.

Can @simon or anyone help point me in the right direction?

Thank you!

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [30 januari 2024 om 02:08 UTC](https://meta.discourse.org/t/automatically-add-wordpress-user-to-discourse-group/293321/2 "2024-01-30T02:08:22Z")

</div>

> [@IreneT](#):
>
> It seems “General” is the default for new Discourse  
> members OR its being pushed through as an “add to Group” request from Wishlist/WP-Discourse.

My guess is that your team have added some code to your WordPress site that is automatically adding users to the “General” group. There are two different ways that this could be done:

- using the `add_user_to_discourse_group` function: [Manage group membership in Discourse with WP Discourse SSO](https://meta.discourse.org/t/manage-group-membership-in-discourse-with-wp-discourse-sso/74724)
- using the `wpdc_sso_params` filter: [Automatically Adding New Users (from WP integration) To A Group - #4 by simon](https://meta.discourse.org/t/automatically-adding-new-users-from-wp-integration-to-a-group/156777/4)

It’s also possible that your team have renamed the “trust level 0” group to “General”, but that seems unlikely.

> [@IreneT](#):
>
> We want to change which group the new members are automatically added to, which will be a “temporary” group (Group: Onboarding) that members go into automatically when they first sign up

Assuming that users are currently being added to the “General” group with code that’s been added to your WordPress site, you need to find the code that is causing that to happen, then edit the code to change “General” to “Onboarding”.

---

<div class="post-metadata">

### Author: ![IreneT](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/irenet/32/305959_2.png) [@IreneT](https://meta.discourse.org/u/IreneT)
#### Post date: [30 januari 2024 om 04:37 UTC](https://meta.discourse.org/t/automatically-add-wordpress-user-to-discourse-group/293321/3 "2024-01-30T04:37:15Z")

</div>

Thanks so much as always @simon - I’ll share this to our tech team should they have additional questions to proceed with adding new members to a specific discourse group upon registration

---

<div class="post-metadata">

### Author: ![waffleslop](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/waffleslop/32/244974_2.png) [@waffleslop](https://meta.discourse.org/u/waffleslop)
#### Post date: [30 januari 2024 om 19:15 UTC](https://meta.discourse.org/t/automatically-add-wordpress-user-to-discourse-group/293321/4 "2024-01-30T19:15:34Z")

</div>

> [@simon](#):
>
> using the `add_user_to_discourse_group` function: [Manage group membership in Discourse with WP Discourse SSO](https://meta.discourse.org/t/manage-group-membership-in-discourse-with-wp-discourse-sso/74724)

This was it! The code was in `functions.php`. Forgot about that! 🙏

---

<div class="post-metadata">

### Author: ![IreneT](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/irenet/32/305959_2.png) [@IreneT](https://meta.discourse.org/u/IreneT)
#### Post date: [30 januari 2024 om 19:30 UTC](https://meta.discourse.org/t/automatically-add-wordpress-user-to-discourse-group/293321/5 "2024-01-30T19:30:29Z")

</div>

We’re now able to update our new members to be assigned to a specific group in Discourse. Thanks so much as always @simon

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [29 februari 2024 om 19:31 UTC](https://meta.discourse.org/t/automatically-add-wordpress-user-to-discourse-group/293321/6 "2024-02-29T19:31:22Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
