1. Home
  2. Docs
  3. RCP BuddyPress
  4. Filters
  5. rcpbp_user_group_creation_limit

rcpbp_user_group_creation_limit

Modify the number of groups a user can create.

Parameters:

$limit_total - integer, total number of groups the current user can create.
$membership_limits - array, array of all membership limits attached to RCP customer.
$user_id - integer, ID of current user.

Examples:

/* Limit users by their highest available membership level limit instead of the sum of their limits */
add_filter( 'rcpbp_user_group_creation_limit', function ( $limit_total, $membership_limits, $user_id ) {
   return max( $membership_limits );
}, 10, 3 );
Was this article helpful to you? Yes No

How can we help?