WP(SSO)+ LMS + Discourse 建议/最佳实践?

Hi!

I’m still reading through old threads on using WP SSO, but I was curious if sharing our roadmap might surface any advice. Are there things we should look out for? Things we should avoid?

Our Stack:

  • WordPress (foundation)
  • MemberPress (manages user accounts)
  • LearnDash (LMS, course creation)
  • Discourse (private, member community)

Our Desired Onboarding Experience:

  1. Visitor arrives on our WP site (content marketing) & converts to paid member.
    – We’re thinking about a 24-hour free trial (w/ auto-conversion).
  2. WP Discourse plugin (SSO) generates Discourse account (TL0).
  3. TL0 gets read-only access to the bulk of the categories.
  4. TL0-1 promotion requires 5 minutes posting an introduction.
  5. After 24hrs, member’s card is charged, membership is official, auto-promoted to TL1.

WP SSO would manage accounts so that only paid/current members have access to both community and LMS content.

I’m curious if there’s either a simpler or better way to do this. Reducing new member friction is important, but so is ensuring longterm scalability, ya know?

Appreciate any insights. Thank you.

From your onboarding list, it looks like you are hoping to override the Discourse trust level system. I think a better approach would be to use Discourse group membership to control access to your site’s content. For details about how this works, see How to use category security settings to control access to content.

The WP Discourse plugin has a couple of functions that you can use to add and remove users from groups. Details are in this topic: Managing Discourse group membership with WP Discourse. That topic uses the PaidMembershipsPro plugin as an example, but the same idea should work with MemberPress.

Another topic that may have useful information is How to prevent some WP users from being able to login to Discourse.

Thank you, Simon. I’ll be sure to read those topics first/next. Appreciate it.

Those threads were helpful. I’ve got WP Discourse installed and connected to Discourse. I might even have some new (better) ideas for our onboarding experience. Thank you, @simon!

I stopped short of making any SSO decisions, though. Afraid the more I read about these, the more my brain goes in circles and I get dizzy. Could I trouble you for a bit more advice on this front?

Given: WordPress & MemberPress + Discourse + LearnDash… and wanting to pay gate everything that isn’t a blog post…

If Discourse is SSO CLIENT, we’d use MemberPress to manage accounts in WordPress and access to LearnDash courses. This was how we approached things from the start, so it inherently makes sense, if not from a place of implementation/scalability best practices.

If Discourse is SSO PROVIDER, we’d need to source and implement a paygate on the Discourse side (none of which I’ve seen so far instill much confidence, to be honest). If we could dump MemberPress on the WP side, it might be worth the switch, but I’m not sure how this would work with wanting synced users in WP accessing LMS content at special, member-prices, while the general public was presented full retail.

Does this make sense? Tried to make this clear, but I’m getting a bit turned around.

I feel like one email to Jay would handle this, but every dollar spent on dev is a dollar we don’t have for the rest of our startup plans. (Feels more and more like we should defer to Jay.) :wink:

Thanks.

关于这个技术栈/前端的一个有趣进展。@simon 很好奇你的看法。

  • MemberPress 负责会员管理和支付处理。这很简单。
  • MemberPress 旨在管理对本地 WordPress 内容的访问权限。
  • MemberPress 无权通过 SSO 限制对 Discourse 的访问。

我发现,当某人的信用卡被拒付时,他们的会员资格会被暂停,但由于他们仍然可以登录 WordPress,因此他们仍可通过 SSO 访问 Discourse。

让 SSO 插件在允许某人登录 Discourse 之前,考虑其会员状态(来自 MemberPress),会有多大的麻烦?

我觉得我们目前的集成方式既具有成本效益又足够简单,如果 SSO 插件能处理这一点,我们在可预见的未来就会一切顺利。但我也觉得这条路径可能会导向需要大量定制开发的工作。

就个人而言,我们越能保持事物接近 Discourse 的“开箱即用”状态,对我们越有利。

再次感谢你的建议。抱歉打扰了,Simon。:slight_smile:

如果你能查明 MemberPress 是如何确定哪些用户有权访问 WordPress 上的受保护内容,那么同样的数据也可用于限制 Discourse 的 SSO 登录。为此,你需要在该主题的第二条帖子中的两个函数里添加一个条件语句:如何阻止部分 WordPress 用户登录 Discourse。该条件语句应在用户账户被暂停时返回 true

你希望实现的目标是可行的,但你可能需要一位 WordPress 开发人员的帮助,以确定在上述两个函数中应写入何种条件语句。

一如既往,谢谢你,Simon。

说实话,刚才 review 完那段代码,我的脑子都有点疼了,但我还是会把它搞定。:slight_smile:

如果您在我们的 Marketplace 分类中创建一个新主题,本站可能有人能为您提供帮助。我注意到有一个旧的市场主题与您的目标相似:https://meta.discourse.org/t/hiring-integrate-our-discourse-with-memberpress-for-membership-site/104033。

谢谢你的建议,Simon。我会去看看的!