BuddyDev

Search

[Resolved] BuddyPress Limit Friendship Issue

  • Participant
    Level: Initiated
    Posts: 7
    FreeSpy on #8382

    “For now, I have allowed users to accept any pending request they already have even if the limit is over. Please do let me know if you don’t want that and I will include it.”

    I just purchased the plugin, I would not like to allow users to accept any pending request they already have. Can you help me on that? Thank you very much!

  • Keymaster
    (BuddyDev Team)
    Posts: 21477
    Brajesh Singh on #8383

    Hi,
    Thank you for purchasing the plugin and my apologies for the inconvenience. I am checking the plugin and will update you in an hour.

    Thank you
    Brajes

  • Keymaster
    (BuddyDev Team)
    Posts: 21477
    Brajesh Singh on #8385

    Hi Again,
    I have tested it and it is working fine. Can you please do the following and check:-

    1. Visit Dashboard->Settings->BuddyPress->Options

    At the bottom of this page you will see the settings for this plugin. Please select the criteria( Friends count or Friends/Friend Request) and the count. Click save.

    Now logout as admin, admins don’t have any limitation. Try to login as a non admin user and see if it work or not?

    Please do let me know what you find?

    Thank you
    Brajesh

  • Participant
    Level: Initiated
    Posts: 7
    FreeSpy on #8386

    Hi Brajesh,

    The problem is when i created three test users – test1 test2 test3, and send friendship request to each other. The test2 and test3 user can accept two pending friend request from test1 user and makes test1 has two friends even I set limit to 1. And i reread your introduction it said it is now allow the pending friends request to be accepted even above the limit. Could you help me on changing it to not accept pending request when it is already above the limit?

    Thank you.

  • Keymaster
    (BuddyDev Team)
    Posts: 21477
    Brajesh Singh on #8389

    Hi,
    Thank you for clarifying it, I assumed that the plugin was not working. Please allow me to check and post an update quickly.

    Thank you
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 21477
    Brajesh Singh on #8391

    Tested and can confirm that it only prevents sending requests not the accepting.

    I am going to update the plugin to handle this and will give an option to allow site admins restrict friendship request acceptance.

    Do you think we should restrict if any of the 2 users has exhausted allowed limit or only when the user who is accepting has exhausted it?

    Thank you
    Brajesh

  • Participant
    Level: Initiated
    Posts: 7
    FreeSpy on #8393

    Hi Brajesh,

    Thank you very much. I appreciate your time and help for me. I would like the idea that restrict any of the 2 users whether they have exhausted the allowed limit number.

    One more question, I do created different level for my users like – Teacher group and Student group. Is there any way that I can set different limit number for them? Or it is not the initial idea of the plugin?

    Thanks again.

    Regards,
    FreeSpy

  • Keymaster
    (BuddyDev Team)
    Posts: 21477
    Brajesh Singh on #8398

    Hi FreeSpy,
    Thank you.

    1. I am putting an update today for it.
    2. The plugin provides a hook to allow that
    Here is the code that allows the hook

    
    apply_filters( 'bp_limit_friendship_count', $allowed_count, $user_id )
    
    

    You can filter on ‘bp_limit_friendship_count’ to do that. Will you like me to post some sample code?

    Thank you
    Brajesh

  • Participant
    Level: Initiated
    Posts: 7
    FreeSpy on #8407

    Hi Brajesh,

    Perfect! Thank you very much for doing the updates for me!

    Yes. Some sample code would be great for my understanding, and could you mind show me where can I find $user_id for my different groups? I appreciate it.

    Thanks again.

    Regards,
    Richard

  • Keymaster
    (BuddyDev Team)
    Posts: 21477
    Brajesh Singh on #8419

    Hi Richard,
    Thank you.

    Please upgrade to 1.0.3, It limits the acceptence too.
    https://buddydev.com/plugins/bp-limit-friendship/

    I will post the example later today.

    Thank you
    Brajesh

You must be logged in to reply to this topic.

This topic is: resolved