phpBB logon not logging into Simple Membership paywall

pennymachines
User www
User www
Posts: 88
Joined: Mon Feb 06, 2017 9:51 pm

Re: phpBB logon not logging into Simple Membership paywall

Post by pennymachines »

OK, thanks.

I uncommented the line in private static function verify_phpbb_credentials() but it made no difference (tested in Firefox and Chrome).

When user logs into phpBB using the default software, cookies created look something like this:
myforumcookies_k (no value)
myforumcookies_sid (sid alphanumeric string value)
myforumcookies_u (numeric value)
wordpress_test_cookie (WP%20Cookie%20check)

No other related cookies.

When a user logs into phpBB using my WP iframe hack or Wordpress, cookies created look something like this:
__wpdm_client (alphanumeric string value)
PHPSESSID (sid alphanumeric string value)
myforumcookies_k (alphanumeric string value)
myforumcookies_sid (sid alphanumeric string value)
myforumcookies_u (numeric value)
simple_wp_membership_sec_(alphanumeric_string)
swpm_in_use (swpm_in_use)
swpm_session (alphanumeric string value)
wfwaf-authcookie-(alphanumeric_string)
wordpress_logged_in_(alphanumeric_string)
wordpress_sec_(alphanumeric_string)
wordpress_test_cookie (WP%20Cookie%20check)
wp_swpm_in_use (wp_swpm_in_use)
User avatar
axew3
w3all User
w3all User
Posts: 2991
Joined: Fri Jan 22, 2016 5:15 pm
Location: Italy
Contact:

Re: phpBB logon not logging into Simple Membership paywall

Post by axew3 »

When you login in phpBB, there are only 3 cookies released by phpBB:
K, sid, and u

When you navigate WP, it release the wordpress_test_cookie (wp only works with cookie for the user auth process, if they are disabled the WP login simply do not work).
When you login in WP, the plugin, again only set up
k, sid, and u phpBB cookies, all others on list you see are released by WP (two more if not wrong by wp) and all the remaining are released by others WP plugins.

I have read again your post above and i did not realized this:
If, on the other hand, they log in from https://mywebsite.com/subsite1/wp-login.php, (the subsite where Simple Membership is activated) they are logged into phpBB, WP, and WP Simple Membership.

So as you did the hack to fix this situation is perfectly ok
, but
is it the correct behavior of Simple Membership, so to say, if you login into a subsite that's not with Simple Membership activated, and the integration plugin is not active, it let you see the content of the site where the user is not registered in?
pennymachines
User www
User www
Posts: 88
Joined: Mon Feb 06, 2017 9:51 pm

Re: phpBB logon not logging into Simple Membership paywall

Post by pennymachines »

... but is it the correct behavior of Simple Membership, so to say, if you login into a subsite that's not with Simple Membership activated, and the integration plugin is not active, it let you see the content of the site where the user is not registered in?
It's complicated...

At present, logging in from subsite2 (where Simple Membership is not activated), the users is logged into subsite1 (where Simple Membership is activated) and can see Simple Membership content if they are subscribed, but this only works because of another hack in WP functions.php which handles the login, forcing it to go through https://mysite.com/subsite1/wp-login.php

If I removed this function, and a user logged in from https://mysite.com/subsite2/wp-login.php, that user would not be logged into Simple Membership content at https://mysite.com/subsite1
They would have to log in via https://mysite.com/subsite1/wp-login.php
This is true whether WordPress w3all phpBB integration is network activated or not.

So in short, logging into Simple Membership only works from the WP subsite on which that plugin is active. (My phpBB and WP functions.php hacks get around this problem).
Post Reply