Skip to:

Opened 3 months ago

Last modified 5 weeks ago

#8297 assigned defect (bug)

The function groups_get_invites_for_user() can return inconsistent total

Reported by: imath Owned by: dcavins
Milestone: 7.0.0 Priority: normal
Severity: normal Version:
Component: Groups Keywords: dev-feedback

Description (last modified by imath)

Now that Group invites are managed using the BP Invitations API, it looks like the total of groups can be inconsistent into this function. I've found a case where there were no groups found and the total was 1. The reason was the $wpdb . 'bp_invitations' table was containing an invite for a group that has been deleted.

Is there a reason why we don't use the total number of groups returned by the groups_get_groups() and use instead groups_get_invite_count_for_user() which run an extra DB query that can be wrong...


Change History (4)

#1 @imath
3 months ago

  • Description modified (diff)

#2 @imath
3 months ago

  • Description modified (diff)

#3 @dcavins
3 months ago

  • Owner set to dcavins
  • Status changed from new to assigned

Also need to double-check that invites for deleted groups are being removed when the group is deleted.

#4 @imath
5 weeks ago

  • Milestone changed from Up Next to 7.0.0
Note: See TracTickets for help on using tickets.