Viewing 9 replies - 1 through 9 (of 9 total)
  • Michael Beckwith

    (@tw2113)

    The BenchPresser

    Are you checking with an admin or super admin user? Also possible that it’s not showing up because the BP install isn’t in the main site in the network. I believe I have a filter for this, but I’d need to re-read the code for what that filter is.

    There are fundamental conflicts that I haven’t found the best resolution for, when it comes to Multisite. The conflicts stem from the fact that only Super Admins are able to manage users in multisite, and it’s something that trickles down to WordPress core devs and explicit decisions on the topic.

    Thread Starter Dominique Leweb

    (@dominique-leweb)

    Thank you Michael, I think I have a beginning of answer.

    Budypress is really heavy and multisite too. I have activate Buddypress only for one subsite. That’s true.

    However I’m Super Admin so all my test and work are done as Supeadmin ;o)

    So… I have activate BP and your plugin in the main site. And indeed your settings appear in admin menu but always for the main blog.

    I have try in sub-blog but doesn’t work. Nothing in admin menu and if I do subscription (in an other browser as visitor), subscription is accepted. No moderation.

    So it means your plugin doesn’t work in subblog in Multisite. (WPMU)

    Do you think you can solve this problem… quickly ???

    Dominique

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    You should be able to pass in the intended site ID into the following filter to change it from the main site:

    apply_filters( 'bp_registration_filter_blog_id', $default_check )

    Example, if you want the menu to show up on site ID 2, which is where the BP install is at:

    function prefix_change_bpro_site( $site_id ) {
        return 2;
    }
    add_filter( 'bp_registration_filter_blog_id', 'prefix_change_bpro_site' );

    I believe this should work for a functions.php file, but if not, perhaps make it be a small quick network-activated plugin or so.

    I’m just trying to get around the same problem myself.
    I have a development multisite install, and want to run the BP Registration options plugin on every site EXCEPT the main site. Buddypress will be running on all subdomains but not the main site.

    I created a plugin using the above filter, which then allows the BP Registration options to appear on the filtered site ID, but how can I amend this code to allow the options to appear on all site ID’s except ID=1 ?

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Couple things to note here.

    One, 4.3.0 is going to be removing the limit. However, I don’t know when 4.3.0 will be released still. This commit is what removed the limiting: https://github.com/WebDevStudios/BuddyPress-Registration-Options/commit/9649582e75f7630cde3c9be5c8fa16a22637dcd1

    Two, from the looks of things, you’d need to either add a filter callback conditionally per site, so that each can return their own ID, or set up one callback and return the ID based on the current site.

    For example

    function example_callback( $site_id ) {
        return get_current_blog_id();
    }
    add_filter( 'bp_registration_filter_blog_id', 'example_callback' );
    

    It looks like get_current_network_id() would work as well, as long as you’re on WP version 4.6.

    That callback based on the current site id works a treat, thanks.

    Now I just need to find a solution to two other registration/access issues.

    Firstly, why WordPress does not auto assign “subscriber” role to a new user, instead the field says “not assigned”, with just the Buddypress role allocated as “participant”.
    I really dont want to have to manually assign “subscriber” to every user of every sub-domain.

    Secondly, how I can prevent multisite users who register on one sub-domain from logging in on other subdomains. I need to limit each user to the site they register on.

    Whilst not directly related to BP Registration Options, just wondered if you had any suggestions?

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Not sure the best route forward for those remaining items. We don’t set user roles at all with the plugin, we simply append some user meta after registration/activation, and go based off of that.

    I think people who sign up with specific sub-sites should already get restricted away from accessing the others in the network. However, the usermeta table will be the same for all, so I think technically they’d be either restricted on all by us, or unrestricted by all. We haven’t done extensive testing on multisite, and don’t have a mechanism set up for per-site authorization.

    In tests I can confirm that a user signed up to sub-domain 1 can log in and interact with profiles and forums on sub-domain 2 – hence the problem.

    As I understand it WP User log in access to all network sites is by design, in that all network users have access to all sites should they choose to.
    Viewing other sites is not the issue, nor is the being able to log in to each site really, but then having write access to a site that the user didnt register to is a problem.

    I could probably get by with WP not auto assigning a subscriber role to a new user of a sub-domain and doing it manually once the sites admin has approved the registration, since the principle interaction on each site is via Buddypress and bbpress which has its own role structure.
    But letting users of one site have write access to another sites forums and messaging etc is a deal breaker.
    Unless I can find a way around that I will have to ditch the multisite platform and stick to single installs for each site, which I would rather avoid!

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Wish I had a better answer for you as well, from my end.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Settings doesn't appear in my admin !’ is closed to new replies.