BuddyDev

Search

[Resolved] BuddyPress Multi Network – Main site users have access to all subsites

  • Participant
    Level: Enlightened
    Posts: 47
    Sotiris on #32505

    Hi BuddyDev (Brajesh)

    I’ve been using BP Multi Network for a while and everything are working pretty well! I am running the BuddyBoss plugin, which is a fork of BuddyPress and bbPress. All of these are running in multisite mode.

    I am using your BP Multi Network and all users registered in subsites are having access only to the subsite they have register.

    HAVING ISSUE:
    When a user registers the main site, then he has access to all subsites.

    Do you have a tool that prevents users from accessing the network and other sub-sites? Or is there a code I can implement in order to control this behavior. I want the users to have access only to the site they are registering.

  • Participant
    Level: Enlightened
    Posts: 26
    Rami Awad on #32541

    Hello Sotiris,

    I solved this problem by adding a bp-custom.php file to wp-content/plugins/ enabling multiblog

    Create a file with text editor and name it bp-custom.php with the following lines below and add it using ftp to wp-content/plugins/

    <?php
    // define( ‘BP_ENABLE_MULTIBLOG’, true );
    define( ‘BP_ENABLE_MULTIBLOG’, true );

    You can also try Bp Registration options plugin, you can define registration rules for every subsite.

    Note: take care that when a user register to a subsite, he will receive a participant role on main site by default which makes him access buddyboss components anyway on the main site unless you are denying it using a pluign like “members only pro” (It doesn’t show in the admin users page that the user has a participant role but if you tried to access the profile of the user who registered on the subsite only on the main site you will find that he has access because of the participant role)

    Regards.

  • Participant
    Level: Enlightened
    Posts: 47
    Sotiris on #32547

    Hello Brajesh,

    I have enabled the ‘BP_ENABLE_MULTIBLOG’ and also used the Bp Registration options plugin. But the two main issues that I am facing now are listed below:
    -I created two subsites (subsite1 & subsite2)
    -User1 registers in subsite1
    -User1 activates his account (mail approval)
    -User1 is only shown on Users of subsite1
    -Issue1: User1 is shown on Bp Registration plugin’s ‘Member requests’ on subsite1 and on subsite2
    -Issue2: User1 successfully login to subsite2 and then User1 is only shown on Users of subsite2

    Is there any way for the registered users of subsite1, not being able to login to another subsite (e.g. subsite2)?

    Best Regards,
    Sotiris

  • Participant
    Level: Enlightened
    Posts: 26
    Rami Awad on #32549

    Hello Sotiris,

    Well first I am not Brajesh, I just saw your message stating a problem I managed to solve before so I shared what I did 🙂

    As for your issue, that shouldn’t happen! and most probably this is a conflict that drove me crazy before and even buddyboss support couldn’t solve it for me, so try the following:

    Deactivae all plugins except for buddyboss and BP Multi network only and deactivate the forum discussions component on all subsites then try registration again and see if the problem is solved.

    Note: the forum discussions component and some other buddypress plugins conflicts with this setup of registration that you are aiming for.

    if the problem is solved dont network activate Bp registration just activate it on the subsites.

    On my multisite every subsite has separate registration, the user cant log in to any other subsite, but will have access to the main site anyway because of the participant role when he register to any subsite, however, if the user is logged in already on any subsite (or the main site) and visited another subsite he cant register on the visited site, you must use join blog widget plugin that just assign him a role on the visited subsite. if you want to make him fill registration fields you can use force profile completion plugin. that’s the best that I could do without a custom code.

    Regards,
    Rami

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #32559

    Hi Rami,
    Thank you for the help here.

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #32560

    Hello Sotiris,

    Thank you for the details.

    1. Are you using BuddyPress registration Options plugin? I am not aware of any conflict or compatibility with it. Please Try disabling it and see if the registration appear in one site or more?

    2. The users being able to login to your secondary site, this is expected behaviour. We do not restrict any user from logging. It is a multisite install and any users with a role on sub site will be able to login to sub site. If you are using bbPress forum on any of the sub site, It automatically adds a user role to current site f a user visits it(or tries to logi in). That’s why people are able to login.

    For restricting User login:- I will need couple of days as I don’t have the multisite setup with BP Multi network. We might be able to either disable bbPress from auto adding user to the site or deny login by role.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 47
    Sotiris on #32582
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #32593
    This reply has been marked as private.
  • Participant
    Level: Enlightened
    Posts: 47
    Sotiris on #32609

    A thousand thanks Brajesh. The best support ever!

    Solve my second issue very fast!

    Concerning the bp registration option plugin. I disable it and perform a test by registering a user on a subsite and it appears in other sub-sites also.

    If you have any suggestion, it would be very much appreciated!

    Best Regards,
    Sotiris

  • Participant
    Level: Enlightened
    Posts: 47
    Sotiris on #32610

    Hi Brajesh,

    One question for the proposed solution you shared and was used. All is working great except from the pending sign-ups.
    The users that are registering in a subsite and not activating their account are listed in the pending signups on every subsite.

    I do not know if this is the expected behavior. The desired result is only to show in the sub-site the pending users that the registration was made to that sub-site.

    Best Regards,
    Sotiris

The topic ‘ [Resolved] BuddyPress Multi Network – Main site users have access to all subsites’ is closed to new replies.

This topic is: resolved