Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/02/2013 06:29:06 PM (11 years ago)
Author:
boonebgorges
Message:

Introduces bp_*_user_last_activity() functions

User last activity data is currently stored as usermeta, with BuddyPress
making multiple calls directly to the usermeta table to get that data. These
new functions provide a central, standardized way to update and fetch
last_activity information. This makes it easier for plugins to update user
activity programatically in a future-compatible way.

Having this set of functions will facilitate any changes associated with #5128,
whose goal is to move last_activity data out of usermeta altogether.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-messages/bp-messages-classes.php

    r7311 r7334  
    479479        $wpdb->query( $wpdb->prepare( "UPDATE {$bp->messages->table_name_notices} SET is_active = 0 WHERE id != %d", $id ) );
    480480
    481         bp_update_user_meta( bp_loggedin_user_id(), 'last_activity', bp_core_current_time() );
     481        bp_update_user_last_activity( bp_loggedin_user_id(), bp_core_current_time() );
    482482
    483483        do_action_ref_array( 'messages_notice_after_save', array( &$this ) );
Note: See TracChangeset for help on using the changeset viewer.