[buddypress-trac] [BuddyPress Trac] #6025: Add function to send single invitation

buddypress-trac noreply at wordpress.org
Mon Nov 17 18:42:49 UTC 2014

#6025: Add function to send single invitation
 Reporter:  dcavins      |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Core         |    Version:
 Severity:  normal       |   Keywords:  has-patch
 The current send invitations function, `groups_send_invites()` takes an
 inviter ID and a group ID and attempts to send all of the non-sent
 invitations from that user in that group.

 This patch introduces a new function, `groups_send_invite_by_invitee()`,
 that sends a single invitation keyed by the invitee ID and group ID. This
 is useful for sending specific invitations and resending invitations (from
 a group's "invitations" pane or from the group admin in wp-admin).

 I'm attaching two versions: one is built on the current invitation schema,
 the other is built on the new schema proposed by @imath in #5911. (Short
 explanation: currently only one invitation to a group should exist for any
 invitee. Imath proposes that several users could potentially invite the
 same user, so creates multiple invitations--this method makes for a better
 user experience in my opinion, because users aren't stumped when they
 can't create an invitation to a group because someone else already has.)

 In my "pre-5911" version, `groups_send_invite_by_invitee()` only requires
 the invitee ID and group ID (since only one invitation should exist). In
 my "post-5911" version, the function requires invitee ID, inviter ID and
 group ID (so that we send/resend the correct version).

 This function is required for progress on #5336.

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6025>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list