Skip to content

Commit 32ef6e9

Browse files
Copilotswissspidy
andcommitted
Include site URL in remove-role success message when no role given
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
1 parent d0bd37c commit 32ef6e9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

features/user.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,9 @@ Feature: Manage WordPress users
352352
| roles | author |
353353
354354
When I run `wp user remove-role 1`
355-
Then STDOUT should be:
355+
Then STDOUT should contain:
356356
"""
357-
Success: Removed all roles from admin (1).
357+
Success: Removed all roles from admin (1) on
358358
"""
359359
360360
When I run `wp user get 1`

src/User_Command.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ public function add_role( $args, $assoc_args ) {
819819
* Success: Removed 'author', 'editor' roles for johndoe (12).
820820
*
821821
* $ wp user remove-role 12
822-
* Success: Removed all roles from johndoe (12).
822+
* Success: Removed all roles from johndoe (12) on http://example.com.
823823
*
824824
* @subcommand remove-role
825825
*/
@@ -848,7 +848,7 @@ public function remove_role( $args, $assoc_args ) {
848848
$user->remove_all_caps();
849849
}
850850

851-
WP_CLI::success( "Removed all roles from {$user->user_login} ({$user->ID})." );
851+
WP_CLI::success( "Removed all roles from {$user->user_login} ({$user->ID}) on " . site_url() . '.' );
852852
}
853853
}
854854

0 commit comments

Comments
 (0)