# WP (SSO) + LMS + Discourse Advice/Best Practices?

**URL:** https://meta.discourse.org/t/wp-sso-lms-discourse-advice-best-practices/127502
**Category:** WordPress
**Created:** [September 3, 2019, 3:51pm UTC](https://meta.discourse.org/t/wp-sso-lms-discourse-advice-best-practices/127502 "2019-09-03T15:51:21Z")
**Posts on this page:** 1
**Showing post:** 7

<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: [January 7, 2020, 5:59pm UTC](https://meta.discourse.org/t/wp-sso-lms-discourse-advice-best-practices/127502/7 "2020-01-07T17:59:27Z")

</div>

> [@TGP](#):
>
> when someone’s credit card is declined, their _membership_ is suspended, but as they can still log into WordPress, they retain access to Discourse via SSO.

If you can find out how MemberPress is determining which users should be able to access protected content on WordPress, then the same data can be used to restrict SSO logins to Discourse. To do that, you will need to add a conditional statement to the two functions in the second post of this topic: [How to prevent some WP users from being able to login to Discourse](https://meta.discourse.org/t/how-to-prevent-some-wp-users-from-being-able-to-login-to-discourse/93234). The conditional statement should return `true` if the user’s account has been suspended.

What you are wanting to accomplish is doable, but you may have to get some help from a WordPress developer to figure out what goes in the conditional statement in the two functions that I linked to.

---

_[View the full topic](https://meta.discourse.org/t/wp-sso-lms-discourse-advice-best-practices/127502)._
