[buddypress-trac] [BuddyPress Trac] #7397: groups_send_invites() should allow us to omit sending to users that have already received an invite

buddypress-trac noreply at wordpress.org
Sat Dec 17 11:21:22 UTC 2016


#7397: groups_send_invites() should allow us to omit sending to users that have
already received an invite
-------------------------+------------------------------
 Reporter:  r-a-y        |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Groups       |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+------------------------------
Description changed by r-a-y:

Old description:

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

New description:

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

--

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7397#comment:1>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list