Skip to:
Content

BuddyPress.org

Opened 3 years ago

Last modified 2 years ago

#7397 closed enhancement

groups_send_invites() should allow us to omit sending to users that have already received an invite — at Version 1

Reported by: r-a-y Owned by:
Milestone: 2.9 Priority: normal
Severity: normal Version:
Component: Groups Keywords: has-patch
Cc:

Description (last modified by r-a-y)

groups_send_invites() is the function that handles sending group invites.

In that function, there is a call to groups_get_invites_for_group(). This function determines what users to send an invite to.

However, groups_get_invites_for_group() doesn't allow us to check if we have already sent an invite to that user due to a lack of check for invite_sent = 1.

Attached patch allows for this and includes unit tests.

Note: I have not changed the default logic of groups_send_invites() to omit sending to those we have already sent invites to. However, we can if we want to.

Change History (2)

@r-a-y
3 years ago

#1 @r-a-y
3 years ago

  • Description modified (diff)
Note: See TracTickets for help on using tickets.