bp_core_remove_data

Delete last_activity data for the user when the user is deleted.

Description

bp_core_remove_data( (int) $user_id ); 

Parameters (1)

0. $user_id (int)
The user ID for the user to delete usermeta for.

Usage

  1. if ( !function_exists( 'bp_core_remove_data' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-members/bp-members-functions.php'; 
  3.  
  4. // The user ID for the user to delete usermeta for. 
  5. $user_id = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_core_remove_data($user_id); 
  9.  

Defined (1)

The function is defined in the following location(s).

/bp-members/bp-members-functions.php  
  1. function bp_core_remove_data( $user_id ) { 
  2.  
  3. // Remove last_activity data. 
  4. BP_Core_User::delete_last_activity( $user_id ); 
  5.  
  6. // Flush the cache to remove the user from all cached objects.