From c199fe4a4554fabc0757e2dc39deac32a6aad50d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Mar 2026 22:18:42 +0000 Subject: [PATCH 1/2] Initial plan From b0e31e567cd8d92a6f764a838c5aecccf4cab7ae Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Mar 2026 22:20:26 +0000 Subject: [PATCH 2/2] Document that --network excludes roles field in wp user list Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com> --- features/user-list.feature | 14 ++++++++++++++ src/User_Command.php | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/features/user-list.feature b/features/user-list.feature index 82982ab53..073d325fc 100644 --- a/features/user-list.feature +++ b/features/user-list.feature @@ -27,6 +27,20 @@ Feature: List WordPress users bobjones """ + Scenario: List network users excludes roles field + Given a WP multisite install + And I run `wp user create bobjones bob@example.com --role=author` + + When I run `wp user list --network --format=csv` + Then STDOUT should contain: + """ + ID,user_login,display_name,user_email,user_registered + """ + And STDOUT should not contain: + """ + roles + """ + @require-wp-4.9 Scenario: List users without roles Given a WP install diff --git a/src/User_Command.php b/src/User_Command.php index e0c8654be..bc8d54eb1 100644 --- a/src/User_Command.php +++ b/src/User_Command.php @@ -71,7 +71,7 @@ public function __construct() { * : Control output by one or more arguments of WP_User_Query(). * * [--network] - * : List all users in the network for multisite. + * : List all users in the network for multisite. Roles are not included when using this flag, as users can have different roles on different sites in a multisite network. * * [--field=] * : Prints the value of a single field for each user.