bp_get_users_of_removed_member_types()

Get members removed profile type.

Description

Return

(array)

Source

File: bp-members/bp-members-functions.php

function bp_get_users_of_removed_member_types(){
	$user_ids = array();
	// get removed profile type post ids
	$bp_member_type_ids = bp_get_removed_member_types();
	// get removed profile type names/slugs
	$bp_member_type_names = array();
	if( isset($bp_member_type_ids) && !empty($bp_member_type_ids) ){
		foreach($bp_member_type_ids as $single){
			$bp_member_type_names[] = $single['name'];
		}
	}

	// get member user ids
	if( isset($bp_member_type_names) && !empty($bp_member_type_names) ){
		foreach($bp_member_type_names as $type_name){
			$type_id = bp_member_type_type_id($type_name);
			$mb_users = bp_active_member_type_by_type($type_id);
			if( isset($mb_users) && !empty($mb_users) ){
				foreach($mb_users as $single){
					$user_ids[] = $single;
				}
			}
		}
	}

	return $user_ids;
}

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.