Well I set the default value for ‘allow global access’ to false in the options file:
function bbp_allow_global_access( $default = 0 ) {
return (bool) apply_filters( 'bbp_allow_global_access', (bool) get_option( '_bbp_allow_global_access', $default ) );
}
Hopefully that together with my other changes will have done the trick.
I think what is required in this context is an option to automatically assign forum roles to registered blog users, but not registered network users, as is currently the case.
Add this in a custom plugin or the functions.php of your active theme:
add_filter( 'bbp_allow_global_access', '__return_false' );
You’ll want to undo the edits you’ve made to bbPress’s files, also.
OK, thanks.
Any thoughts on giving the site users bbPress roles automatically, rather than the network users?
And on running:
Tools -> Forums -> Repair Forums -> Remap existing users to default forum roles
for all blogs too?
I added a simple check in bbpress/inlcudes/users/capabilities.php to see whether the current user has a role in the current blog, before giving them a forum role:
/** Ready *****************************************************************/
// Load up bbPress once
$bbp = bbpress();
// Get whether or not to add a role to the user account
$blog_role = bbp_get_user_blog_role( $user_id );
$add_to_site = bbp_allow_global_access() && $blog_role != false;
With that in place I can reset all my previous changes so that the default setting for global access is true.
I’ve edited the text in Forums -> Settings to show that ‘global access’ is really now just ‘site access’.
Ideally this would be a separate option in Forums -> Settings, to limit automatic forum access to site members. I will submit a patch if I get the time.
The problem with the default settings is that in a large Buddypress-type site, every time I visit a new site when logged in, that site is added to my My Sites list.
Hi,
I am having the exact same issue.
have added :
add_filter( ‘bbp_allow_global_access’, ‘__return_false’ );
to functions.php
no change
I am also having alll sites added to my Admin sites list
any ideas?
Thanks
JT
Hi again, have gone through this again and still new sites have the auto role auto checked on sign up.
Again, I did add the filer in functions.php and just to be sure did th is in child and mother.
still no change
really appreciate some help.
Thanks folks 🙂
JT