BP_Groups_Member::get_memberships_by_id( int|string|array $membership_ids )

Get group membership objects by ID (or an array of IDs).

Parameters Parameters


(int|string|array) (Required) Single membership ID or comma-separated/array list of membership IDs.

Top ↑

Return Return


Source Source

File: bp-groups/classes/class-bp-groups-member.php

	public static function get_memberships_by_id( $membership_ids ) {
		global $wpdb;

		$bp = buddypress();

		$membership_ids = implode( ',', wp_parse_id_list( $membership_ids ) );
		return $wpdb->get_results( "SELECT * FROM {$bp->groups->table_name_members} WHERE id IN ({$membership_ids})" );

Top ↑

Changelog Changelog

Version Description
2.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.