Skip to content

Commit

Permalink
WCPT: Get user info regardless of role on site
Browse files Browse the repository at this point in the history
Previously the query only looked at users with a role on the current site, which didn't always include everyone.

See https://core.trac.wordpress.org/ticket/38851
See https://wordpress.slack.com/archives/C08M59V3P/p1700830335858499
  • Loading branch information
iandunn committed Nov 27, 2023
1 parent 2206668 commit ac3fa93
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ function get_user_nicenames_from_ids( $user_ids ) {

$user_query = new WP_User_Query(
array(
'blog_id' => 0, // All sites, see https://core.trac.wordpress.org/ticket/38851.
'include' => $user_ids,
'fields' => array( 'user_nicename' ),
)
Expand Down

0 comments on commit ac3fa93

Please sign in to comment.