What I’m understanding is that the SSO function is really what gives MM + Discourse it’s link.
When a prospect buys membership via MM, a new WP user is created and then the functions above create a new Discourse user. Similarly, when a membership lapses (non-payment), MM deactivates the WP user and the functions above deactivate the Discourse user.
I’ve gotten SSO configured and created my own plugin for the functions to sit inside.
I’ve run into a few snags. In @lkramer’s post, she mentions the following in Step 2:
So you need add this line to the file /lib/discourse-sso.php in public function __construct( $wordpress_email_verifier ):
I cannot find that file. Here’s what I’m seeing:
(Note: the lib/sso folder is empty)
I did find lib/email-notification.php, which has this line:
/**
* EmailNotification constructor.
*/
public function __construct() {
add_action( ‘init’, array( $this, ‘setup_options’ ) );
}
Is it necessary to change this line? I assume I need to add this new “add_action” from Leah here, then add the scripts below to functions.php, but am not sure that script should go inside this “EmailNotification” bit.
Next major question: Inside Step 4, there are 4 bullets (Use the Discourse API to get the user’s Discourse username), Map their MM Membership ID to equic Discourse group ID, Sync up their user/email if they get changed in WO, Activate/deactivate Discourse users depending on status in MM).
I have a brand new site without any users, aside from Admin.
This seems quite involved. I’m getting outside of my comfort zone (ha! I’ve been outside it for awhile now!).
Questions:
1.) Is anyone able to share how they have these four pieces configured?
2.) Is the #marketplace the right place for me to post to hire someone to do this?
Thanks for all the help. Y’all are the best.