diff --git src/bp-core/classes/class-bp-invitation-manager.php src/bp-core/classes/class-bp-invitation-manager.php
index e1bc7748e..a8bb047ce 100644
|
|
|
abstract class BP_Invitation_Manager { |
| 611 | 611 | * @param int $id The ID of the invitation to mark as sent. |
| 612 | 612 | * @return bool True on success, false on failure. |
| 613 | 613 | */ |
| 614 | | abstract public function run_acceptance_action( $type = 'invite', $r ); |
| | 614 | abstract public function run_acceptance_action( $type, $r ); |
| 615 | 615 | |
| 616 | 616 | /** |
| 617 | 617 | * Mark invitation as accepted by invitation ID. |
diff --git src/bp-groups/classes/class-bp-groups-invitation-manager.php src/bp-groups/classes/class-bp-groups-invitation-manager.php
index d22cd0977..76d4e13c7 100644
|
|
|
class BP_Groups_Invitation_Manager extends BP_Invitation_Manager { |
| 67 | 67 | * @param array $r Parameters that describe the invitation being accepted. |
| 68 | 68 | * @return bool True on success, false on failure. |
| 69 | 69 | */ |
| 70 | | public function run_acceptance_action( $type = 'invite', $r ) { |
| | 70 | public function run_acceptance_action( $type, $r ) { |
| | 71 | if ( ! $type || ! in_array( $type, array( 'request', 'invite' ), true ) ) { |
| | 72 | return false; |
| | 73 | } |
| | 74 | |
| 71 | 75 | // If the user is already a member (because BP at one point allowed two invitations to |
| 72 | 76 | // slip through), return early. |
| 73 | 77 | if ( groups_is_user_member( $r['user_id'], $r['item_id'] ) ) { |