bp_groups_admin_get_usernames_from_ids( array $user_ids = array() )
Get a set of usernames corresponding to a set of user IDs.
Description
Parameters
- $user_ids
-
(Optional) Array of user IDs.
Default value: array()
Return
(array) Array of user_logins corresponding to $user_ids.
Source
File: bp-groups/bp-groups-admin.php
1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 | 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 ; } |
Changelog
Version | Description |
---|---|
BuddyPress 1.7.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.