bp_groups_admin_get_usernames_from_ids( array $user_ids = array() )

Get a set of usernames corresponding to a set of user IDs.


Parameters Parameters

$user_ids

(array) (Optional) Array of user IDs.

Default value: array()


Top ↑

Return Return

(array) Array of user_logins corresponding to $user_ids.


Source Source

File: bp-groups/bp-groups-admin.php

function bp_groups_admin_get_usernames_from_ids( $user_ids = array() ) {

	$usernames = array();
	$users     = new WP_User_Query( array( 'blog_id' => 0, 'include' => $user_ids ) );

	foreach ( (array) $users->results as $user ) {
		$usernames[] = $user->user_login;
	}

	return $usernames;
}


Top ↑

Changelog Changelog

Changelog
Version Description
1.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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