[buddypress-trac] [BuddyPress Trac] #6287: get_invite_count_for_user returning incorrect value (0)

buddypress-trac noreply at wordpress.org
Mon Mar 9 15:36:08 UTC 2015


#6287: get_invite_count_for_user returning incorrect value (0)
-------------------------------+------------------------------
 Reporter:  rogercoathup       |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  API                |     Version:
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |
-------------------------------+------------------------------
Changes (by boonebgorges):

 * keywords:   => reporter-feedback


Comment:

 I've done the following in an mu-plugin:

 {{{
 function bp6287() {
         bp_has_groups();
 }
 add_action( 'init', 'bp6287', 100 );
 }}}

 Then, in the /members/single/groups/invites.php template,

 {{{
 var_dump( groups_get_invite_count_for_user( bp_displayed_user_id() ) ); ?>
 }}}

 The latter is returning the correct number invitations for the current
 user.

 It's possible that there is some cache pollution going on here, but I'm
 not reproducing it given the above. Can you please give additional
 information on how to reproduce the error? Where is the cache being set
 during the first call to `bp_has_groups()`? And why would the value being
 cached be incorrect?

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


More information about the buddypress-trac mailing list