BP_Activity_Follow::get_followers( int $user_id )

Get the follower IDs for a given user.

Description

Parameters

$user_id

(int) (Required) The user ID.

Return

(array)

Source

File: bp-activity/classes/class-bp-activity-follow.php

	public static function get_followers( $user_id ) {
		global $bp, $wpdb;
		return $wpdb->get_col( $wpdb->prepare( "SELECT follower_id FROM {$bp->activity->table_name_follow} WHERE leader_id = %d", $user_id ) );
	}

Changelog

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.