# 用户从自定义组中自动移除

**URL:** https://meta.discourse.org/t/user-removed-automatically-from-custom-groups/192989
**Category:** WordPress
**Created:** [2021年六月7日 14:54 UTC](https://meta.discourse.org/t/user-removed-automatically-from-custom-groups/192989 "2021-06-07T14:54:47Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [2021年六月8日 10:39 UTC](https://meta.discourse.org/t/user-removed-automatically-from-custom-groups/192989/5 "2021-06-08T10:39:44Z")

</div>

Wordpress → WooCommerce → Discourse 会员集成目前没有官方支持。这需要开发人员查看您的具体实现方案。

WooCommerce 集成方案的实现方式差异较大，因此在此情境下提供协助会有一定难度。如果您已无法联系到当初开发该集成的开发人员，可以在 #Marketplace 频道聘请另一位开发人员。

无论您聘请谁来处理此事，以下讨论都将对您有所帮助：

> [@Manage group membership in Discourse with WP Discourse SSO](https://meta.discourse.org/t/managing-discourse-group-membership-with-wp-discourse-sso/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/user-removed-automatically-from-custom-groups/192989)._
