I have tracked down the problem and wonder if there is a way you could integrate an option into your plugin for my situation. I would prefer an option of editing the core of the plugin, this way I can update as needed.
I am using a membership plugin which grants access to sub sites based on members only singing up for thing main site.
This condition keeps my members from gaining access to the sub blog using this plugin.
if (!is_user_member_of_blog($user->ID)) {
return new WP_Error('api_api_bearer_auth_wrong_blog',
__('You are no member of this blog.', 'api_bearer_auth'), ['status' => 401]);
}
It seems you do not have an admin page for options, but maybe a constant could be defined in the wp-config.php file for this. Maybe something like
define(THIRD_PARTY_ALLOW_MULTISITE, true);
then the condition could be something like this
if (!is_user_member_of_blog($user->ID) && !THIRD_PARTY_ALLOW_MULTISITE) {
return new WP_Error('api_api_bearer_auth_wrong_blog',
__('You are no member of this blog.', 'api_bearer_auth'), ['status' => 401]);
}
If you have a better solution that may help me please let me know.
Hi,
I’m not sure if I understand your situation exactly.
You have users that are members of the main blog only, but you still want them to give access to sub sites with this plugin?
BW
Yes, that is exactly what I want to do.
They are paid members tracked within the main blog and only within that blog. Syncing that data across all blogs would not only be nightmarish but also redundant. So, the membership plugin I use allows them access to data based on a membership level not which blog they are a member of. I have code that doesnt send all data from the API unless they are of a certain membership level and you plugin returns an error “not a member of this blog” before I can return the proper data based on membership.