Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/16/2012 04:08:02 PM (12 years ago)
Author:
boonebgorges
Message:

Introduces bp_first_activity_for_member action, and busts member count cache on it

The bp_first_activity_for_member fires when a user's last_activity meta value
is set for the very first time (typically, on login). Busting the total member
count cache on this event ensures that the active member count in the All
Members tab will always reflect the most recent count.

Fixes #4348

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-functions.php

    r6131 r6179  
    498498    // Get current time
    499499    $current_time = bp_core_current_time();
     500
     501    // Use this action to detect the very first activity for a given member
     502    if ( empty( $activity ) ) {
     503        do_action( 'bp_first_activity_for_member', $user_id );
     504    }
    500505
    501506    if ( empty( $activity ) || strtotime( $current_time ) >= strtotime( '+5 minutes', $activity ) )
Note: See TracChangeset for help on using the changeset viewer.