BP_Activity_Follow::delete_all_for_user( int $user_id )
Deletes all follow relationships for a given user.
Description
Parameters
- $user_id
-
(Required) The user ID
Return
(array|bool) array of ids deleted or false if nothing was deleted
Source
File: bp-activity/classes/class-bp-activity-follow.php
public static function delete_all_for_user( $user_id ) { global $bp, $wpdb; $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->activity->table_name_follow} WHERE leader_id = %d OR follower_id = %d", $user_id, $user_id ) ); }
Changelog
Version | Description |
---|---|
BuddyBoss 1.0.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.