# 如何防止部分 WordPress 用户登录 Discourse

**URL:** <https://meta.discourse.org/t/how-to-prevent-some-wp-users-from-being-able-to-login-to-discourse/93234>\
**Category:** WordPress\
**Created:** [2018 年7 月 26 日 19:55 UTC](https://meta.discourse.org/t/how-to-prevent-some-wp-users-from-being-able-to-login-to-discourse/93234 "2018-07-26T19:55:22Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

作者： ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)\
发布日期： [2018 年7 月 27 日 16:02 UTC](https://meta.discourse.org/t/how-to-prevent-some-wp-users-from-being-able-to-login-to-discourse/93234/4 "2018-07-27T16:02:38Z")

</div>

Right, if the **Create or Sync Discourse Users on Login** option is set, users will be automatically created on Discourse when they login to WordPress. There isn’t a great way to override this for a specific user yet. I’m going to update the plugin today. I’ll add a hook to the `sync_sso_record` function that can be used to keep specific WordPress users from being created on Discourse. I’ll update this topic when that has been done.

---

_[View the full topic](https://meta.discourse.org/t/how-to-prevent-some-wp-users-from-being-able-to-login-to-discourse/93234)._
