# Merging existing Discourse and WP user lists

**URL:** https://meta.discourse.org/t/merging-existing-discourse-and-wp-user-lists/115334
**Category:** WordPress
**Created:** [April 17, 2019, 6:25pm 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:** 13

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [April 23, 2019, 6:49pm UTC](https://meta.discourse.org/t/merging-existing-discourse-and-wp-user-lists/115334/13 "2019-04-23T18:49:05Z")

</div>

Check out this post by @simon

> [@Manage group membership in Discourse with WP Discourse SSO](https://meta.discourse.org/t/managing-discourse-group-membership-with-wp-discourse/74724):
>
> [WP Discourse](https://github.com/discourse/wp-discourse) functions The [WP Discourse](https://github.com/discourse/wp-discourse) plugin has a couple of functions that can be used to associate WordPress users with Discourse groups. These functions are only enabled on sites that are using WordPress as the SSO provider for Discourse. add\_user\_to\_discourse\_group( $user\_id, $group\_names ) [View Code](https://github.com/discourse/wp-discourse/blob/main/lib/utilities.php#L278-L301) remove\_user\_from\_discourse\_group( $user\_id, $group\_names ) [View Code](https://github.com/discourse/wp-discourse/blob/main/lib/utilities.php#L303-L326) Each of these functions take the same two parameters: $user\_id: the WordPress user’s id $group\_names: a comma separat…

---

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