مزامنة حالة تسجيل الدخول بين WordPress و Discourse، مزود SSO الخاص بـ Discourse

I’m ALMOST there - thanx for all your help so far… going on our production site today…

I overwrote wp_logout to do exactly as you said (destroy all sessions for a user) and it works the way we want with the wp_discourse plugin now.

Since I went this far, I also solved another problem I was having to hack on the wp_discourse plugin to solve for our community,. Our designer wanted to have existing members remain on the discourse forum when they logged (instead of the WP home page) since they’re familiar with that behavior now (pre WP front end). I had hacked the redirect in the wp_discourse plugin to support this behavior (by a url GET parameter) but, since I was already playing with pluggable functions, I just added my code to wp_login and now I don’t have to have any changes to wp_discourse.

I had thought about suggesting a feature request or pull request for our hacked wp_discourse plugin to do this but it seems to me there are VERY few folks who will want either of these behaviors as it’s outside the regular model of how login/logout works and, as with most features like this it will likely add confusion and/or support problems. So, we’re fine on the unmodified plugin for now. (you’re welcome :grinning:).

Thanks again for all your help and creating a great plugin for us…