[buddypress-trac] [BuddyPress Trac] #6941: Make sure inviter_id !== 0 before inviting a user to a group

buddypress-trac noreply at wordpress.org
Fri Mar 4 19:28:10 UTC 2016


#6941: Make sure inviter_id !== 0 before inviting a user to a group
--------------------------------+------------------------------
 Reporter:  danbrellis          |       Owner:  dcavins
     Type:  defect (bug)        |      Status:  accepted
 Priority:  normal              |   Milestone:  Awaiting Review
Component:  Component - Groups  |     Version:  2.5.0
 Severity:  normal              |  Resolution:
 Keywords:                      |
--------------------------------+------------------------------

Comment (by dcavins):

 Hi @danbrellis-

 I should also mention that, in the groups_members table, membership
 requests to a group are recorded with an `inviter_id` of 0. So maybe
 that's what you're seeing?

 The reason the check doesn't currently exist in `groups_invite_user()` is
 that calls to it only occur on access-protected pages and after a nonce
 check (so the user had to come from an access-protected page). We're
 assuming that `bp_loggedin_user_id()` will always be true in those
 circumstances.

 That said, I'm fine with making the change you're requesting, though.

 Thanks!

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


More information about the buddypress-trac mailing list