Digital Sovereignty for everyone

Team join requests

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.

Turning it on

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).

Deciding

  • Approvers are users with add_users on the site, as for membership applications. They get one rolling BuddyPress notification per site (“Jane Smith asked to join Team”).
  • Users > Team Requests lists open requests with Approve and Decline. It appears when the site has a review rule or open requests.
  • Approving adds the member to the team. Declining closes the request; the member can ask again. Either way the member gets a BuddyPress notification.
  • If the member joins the team another way, for example their captain adds them, the open request is closed.
  • The list-team-requests, approve-team-requests and decline-team-requests abilities do the same over MCP, per site (site_id).

Storage

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.

Hooks

  • 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).

Not yet covered

Accepting a captain’s group invite, and requesting membership of a private group, still join or go to the group admins as before.

If you like this plugin please consider making a donation to further development

Install LHero.org

lhero.org

Open it straight from your home screen, full screen and quicker to load.

  1. Tap the Share button . If you cannot see it, tap ••• first.
  2. Scroll down and tap Add to Home Screen.
  3. Tap Add.
  1. Tap the browser menu â‹®.
  2. Tap Install app or Add to Home screen.
  1. In the menu bar, choose File, then Add to Dock.

Use your browser's menu to install this site or add it to your home screen.