Limit Total Number of Invites Per User
-
Hi Boone,
I’m looking at the invite_anyone_screen_one_content() function found in the by-email.php file, and I see this:
// If the user has maxed out his invites, no need to go on if ( !empty( $iaoptions['email_limit_invites_toggle'] ) && $iaoptions['email_limit_invites_toggle'] == 'yes' && !current_user_can( 'delete_others_pages' ) ) { $sent_invites = invite_anyone_get_invitations_by_inviter_id( bp_displayed_user_id() ); $sent_invites_count = $sent_invites->post_count; if ( $sent_invites_count >= $iaoptions['limit_invites_per_user'] ) : ?> <h4><?php _e( 'Invite New Members', 'bp-invite-anyone' ); ?></h4> <p id="welcome-message"><?php _e( 'You have sent the maximum allowed number of invitations.', 'bp-invite-anyone' ); ?></em></p>
What I’m trying to do is limit the amount of invites that my members can send to 10. After which, they will not be able to send invites until I enable unlimited invites again (after prelaunch).
My question is, does the code above limit the total amount of invites that can be sent by a user? Or does it just limit the amount of invites that can be sent at one time? I see the settings that allow you to control how many can be sent at once, but I don’t see any settings for a total invite limit. Did I overlook something?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Limit Total Number of Invites Per User’ is closed to new replies.