A site can require approval before its members join a team. When it does, the team’s Join button reads Request to join, and pressing it records a request instead of joining. Once a request is open the button reads Request pending. Nothing changes on a site that does not ask for this.
A site plugin returns true from lh_membership_team_join_requires_review( $requires, $user_id, $group_id, $context ) for the joins it wants reviewed. The filter defaults to false, and people who can approve requests (add_users on the site) are never held. $context is join (the Join button).
add_users on the site, as for membership applications. They get one rolling BuddyPress notification per site (“Jane Smith asked to join Team”).list-team-requests, approve-team-requests and decline-team-requests abilities do the same over MCP, per site (site_id).Requests are rows of the organisation invitation class (LH_Membership_Organisation_Team_Invitation_Manager) with type request: item_id the site, secondary_item_id the team, inviter_id the member. Open until decided, then marked accepted and kept as history. Deleting the account deletes them.
lh_membership_team_join_requires_review (filter): whether a join needs review.lh_membership_team_request_notes (filter): plain-text context shown to approvers for a request, such as the member’s other teams.lh_membership_team_request_created, _approved, _declined and _closed (actions).Accepting a captain’s group invite, and requesting membership of a private group, still join or go to the group admins as before.