BuddyDev

Search

Limit groups per user

  • Participant
    Level: Master
    Posts: 279
    NikB on #45786

    Hi there

    I’m using your Limit Groups per User plugin to restrict group creation to users who have a (custom) role of “Authorised User”.

    This all works very well except that when visiting the groups page, the “Create a group” link is hidden to (standard) “Subscribers”. Of course, I understand the logic here as since they don’t have the permissions to create a group, why would they need to see the link however… ideally what I would like to happen is for the link to appear but when clicked (by a Subscriber) it would re-direct them to a page telling them how to “get authorised”.

    Interestingly it seems as if there is already an option in the plugin to redirect to another page however it’s not clear how a user is ever going to reach that page if they can’t see the “Create a group” link…

    Long story short, any way of displaying the “Create a group link” for ALL, regardless of whether they actually have permission to create a group? 😉

    With many thanks in advance
    Nik

  • Keymaster
    (BuddyDev Team)
    Posts: 24211
    Brajesh Singh on #45787

    Hi Nik,
    Thank you for using the plugin.

    1. The plugin filters group creation permission and there is no way to differentiate if the checks were made for showing button or before submission.

    Your solution will be hardcode the Create group button in the buddypress/groups/index.php of your theme to always show it.

    2. The users can access your create group step manually. If someone did, the redirect is used to send them at a different place if they have reached the limits.

    Hope that helps

    Regards
    Brajesh

  • Participant
    Level: Master
    Posts: 279
    NikB on #45788

    Hi Brajesh

    Wow… thank you for such a super fast response!

    That all makes perfect sense and yes, I was already thinking I might put a link elsewhere if there’s no other option.

    Many thanks and really appreciate your help as always.

    Nik

  • Keymaster
    (BuddyDev Team)
    Posts: 24211
    Brajesh Singh on #45793

    Hi Nik,
    You are welcome.

    Have a great day!

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 3
    Poindexter on #45795

    Hello Brajesh,

    Can the settings regarding roles work with a membership plugin like MemberPress?

    Example:

    Membership Levels

    Bronze: Group Cration Limit; 2 Groups
    Silver: Group Cration Limit; 5 Groups
    Gold: Group Cration Limit; 15 Groups

    • This reply was modified 1 year, 9 months ago by Poindexter.
  • Keymaster
    (BuddyDev Team)
    Posts: 24211
    Brajesh Singh on #45807

    Hi Poindexter,
    Welcome to BuddyDev support forums.

    If they are WordPress roles, I don’t see any issue.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved