Membershipworks and Powerpress
-
So… we have been dealing with authentication issues for months on our feed, which is password protected.
We use Membershipworks for member management and they do insert themselves into the login process. However, they update the WordPress database with the correct password.
I do not believe that it is related to server setup (i.e, .htaccess issues). I have concluded this because I can use my Administrator account to login/logout of the website as well as authenticate the feed. When I use a “normal” account (Premium Subscriber role) the feed does not authenticate.
Some months back I emailed with y’all about these authentication issues. We came up with this code that goes in the file powerpress-feed-auth.php:
// old code
// $userObj = wp_authenticate($user, $password);// if( !is_wp_error($userObj) )
// {
// Check capability…
// if( $userObj->has_cap( $FeedSettings[‘premium’] ) )
// return; // Nice, let us continue…
// powerpress_feed_auth_basic( $FeedSettings[‘title’], __(‘Access Denied’, ‘powerpress’) );
// exit;
// }// new code
$userObjID = get_user_by( ’email’, $user );
if( !is_wp_error($userIDObj) )
{
$userObj = wp_authenticate($userObjID->user_login, $password);
if( !is_wp_error($userObj) )
{
// Check capability…
if( $userObj->has_cap( $FeedSettings[‘premium’] ) )
return; // Nice, let us continue…
powerpress_feed_auth_basic( $FeedSettings[‘title’], __(‘Access Denied’, ‘powerpress’) );
exit;
}
} else {
powerpress_feed_auth_basic( $FeedSettings[‘title’], __(‘Access Denied’, ‘powerpress’) );
exit;
}I thought this had fixed us up, but when I add it to the latest update, no go. BTW, we made this change because Membershipworks wanted the email to be verified. In any case, I can login/out using the standard WordPress login page (using the email address as the username) so I would think that PowerPress would do the same.
Now, I am wondering if that coding “fix” ever worked. The fact that Adminstrators can login but Premium Subscribers cannot is confusing.
What capabilities would my Administrator role have that the Premium Subscriber role does not have that is affecting this?
- The topic ‘Membershipworks and Powerpress’ is closed to new replies.