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

buddypress-trac noreply at wordpress.org
Mon Nov 17 22:07:20 UTC 2014


#6025: Add function to send single invitation
-------------------------+------------------
 Reporter:  dcavins      |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  2.2
Component:  Groups       |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  needs-patch  |
-------------------------+------------------

Comment (by dcavins):

 Replying to [comment:2 boonebgorges]:
 > Oh, and one more quick comment: can we go with the pre-5911 patch for
 now, and then create a patch that can be applied when/if 5911 is resolved,
 which will bring it in line with that change?

 Yes, as long as we require the `$inviter_id` arg now in either case, then
 updating for #5911 would only require the internal addition of the
 `$inviter_id` argument in `groups_check_user_has_invite()`.

 And, yes, `groups_send_invites( $user_id, $group_id )` could definitely
 use the new function internally. I'll write it as such and add some more
 test cases. Re the `groups_send_invites` action. It would have to live in
 the child function (by_invitee), but its arg is an array (I made my arg
 `array( $invitee_id )` so that it would be cast as expected). Can you
 think of any reason that calling it six times for six single invites would
 be not acceptable for some action that is expecting a cohort of invited
 IDs in a single array?

 Re tests: I think testing for non-existent groups/users should fall to
 `groups_check_user_has_invite()` which is what I'm using to verify that
 the invitation is legit. I'll add some tests for that function, too.

 Thanks for the quick feedback!

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


More information about the buddypress-trac mailing list