Skip to content

Commit 7064d7c

Browse files
Copilotswissspidy
andauthored
Document that --network excludes roles from wp user list output (#597)
* Initial plan * Document that --network excludes roles field in wp user list Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
1 parent f731ac8 commit 7064d7c

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

features/user-list.feature

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,20 @@ Feature: List WordPress users
2727
bobjones
2828
"""
2929

30+
Scenario: List network users excludes roles field
31+
Given a WP multisite install
32+
And I run `wp user create bobjones bob@example.com --role=author`
33+
34+
When I run `wp user list --network --format=csv`
35+
Then STDOUT should contain:
36+
"""
37+
ID,user_login,display_name,user_email,user_registered
38+
"""
39+
And STDOUT should not contain:
40+
"""
41+
roles
42+
"""
43+
3044
@require-wp-4.9
3145
Scenario: List users without roles
3246
Given a WP install

src/User_Command.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function __construct() {
7171
* : Control output by one or more arguments of WP_User_Query().
7272
*
7373
* [--network]
74-
* : List all users in the network for multisite.
74+
* : 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.
7575
*
7676
* [--field=<field>]
7777
* : Prints the value of a single field for each user.

0 commit comments

Comments
 (0)