# Merging existing Discourse and WP user lists

**URL:** https://meta.discourse.org/t/merging-existing-discourse-and-wp-user-lists/115334
**Category:** WordPress
**Created:** [4월 17, 2019, 6:25오후 UTC](https://meta.discourse.org/t/merging-existing-discourse-and-wp-user-lists/115334 "2019-04-17T18:25:27Z")
**Posts on this page:** 1
**Showing post:** 31

<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: [5월 1, 2019, 4:32오후 UTC](https://meta.discourse.org/t/merging-existing-discourse-and-wp-user-lists/115334/31 "2019-05-01T16:32:09Z")

</div>

> [@nefibach](#):
>
> So when a user cancels their subscription in Memberpress, is it possible for that to be passed through to Discourse to remove them from the Members group, so that they can only access the public content?

There are a couple of ways that users can be added to and removed from groups. The easiest way to do it is to use the `add_groups` and `remove_groups` SSO parameters. That approach is outlined here: [Bring over permission level from WordPress MemberPress - #2 by simon](https://meta.discourse.org/t/bring-over-permission-level-from-wordpress-memberpress/78074/2). The issue with this approach is that it requires users to log out and log back in again before their group memberships will get updated.

The other approach is to use the `add_user_to_discourse_group` and `remove_user_from_discourse_group` functions that are outlined in this topic: [Manage group membership in Discourse with WP Discourse SSO](https://meta.discourse.org/t/managing-discourse-group-membership-with-wp-discourse/74724). The benefi of that approach is that it’s not dependant on the user logging out - their membership levels will be changed as soon as the functions are called.

---

_[View the full topic](https://meta.discourse.org/t/merging-existing-discourse-and-wp-user-lists/115334)._
