Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions features/user-list.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/User_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -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=<field>]
* : Prints the value of a single field for each user.
Expand Down
Loading