BuddyDev

BuddyPress Limit Friendship

July 25th, 2013: BuddyPress Limit Friendship plugin is tested to Work With BuddyPress 1.8

BuddyPress Limit Friendship plugin allows site owners to limit the no. of friends a user can have on their network. It does so based on the 2 criteria.

The criteria are:-

  • No. of Existing Friends
  • No. of Existing Friends + No. of Pending Friendship Request Sent & Received
Here is the admin screen(You can see it by going to settings->BuddyPress->Settings)

When you select the criteria as No. of existing Friends, The plugin only checks for existing friends count(for both the users) and will limit the user to be added as friend or to add a new friend if they have
When you select the criteria as No. Of existing Friends + Friendship Requests, the plugin will check for both the users that they don’t have crossed the limit(The sum of Friendship Requests sent, which is pending; The friendship requests received  which is not approved and the total no. of exiting friends is less than the allowed limit for both the users).

This plugin is also compatible with our Extended Friendship request plugin.

Here is an example of what happens when a user tries to add new friend.

The best use case will be to use this plugin in a membership based site and ask users to upgrade account for more friends or to use it as a tool for spam control(Do not allow too many friends quickly).

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  want that and I will include it.

Release History

  • Version: 1.0

    Friday, 07 June, 2013

    • Tested With: BuddyPress 1.7+/BuddyPress1.8
    • Compatible With: BuddyPress 1.7+/BudddyPress1.8

    Initial release