Reply To: Rebooting Activity Stream?
@mbfit If by “unsearchable” you mean that they don’t show up in the directory anymore, then the problem is probably that the plugin deleted the ‘last_activity’ activity items for each user. As such, BP doesn’t show them as active users.
If you retained a backup before you ran the delete process, then you should restore the last_activity items from it. If not, you can run a script that will set last_activity for all users that don’t have it set – though note carefully that it won’t really be *accurate*.
function bbg_set_last_activity() {
global $wpdb;
$user_ids = $wpdb->get_col( "SELECT ID FROM {$wpdb->users}" );
foreach ( $user_ids as $user_id ) {
if ( bp_get_user_last_activity( $user_id ) ) {
continue;
}
bp_update_user_last_activity( $user_id );
}
}
As to your original question, there is no single UI or command you can run to delete activity items based on date. wp-cli-buddypress would be part of a good solution, but it would take additional scripting to delete based on date range. If you have some familiarity with bash scripting or PHP scripting, I will point you in the right direction, but I don’t want to just give you stuff to copy and paste, because deleting stuff is dangerous 😀