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.