Skip to content

Commit fd18772

Browse files
authored
Merge pull request #467 from ernilambar/update-user-examples
2 parents 9ffed77 + 33451df commit fd18772

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

src/User_Command.php

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*
2929
* # Delete user 123 and reassign posts to user 567
3030
* $ wp user delete 123 --reassign=567
31-
* Success: Removed user 123 from http://example.com
31+
* Success: Removed user 123 from http://example.com.
3232
*
3333
* @package wp-cli
3434
*/
@@ -262,12 +262,12 @@ public function get( $args, $assoc_args ) {
262262
*
263263
* # Delete user 123 and reassign posts to user 567
264264
* $ wp user delete 123 --reassign=567
265-
* Success: Removed user 123 from http://example.com
265+
* Success: Removed user 123 from http://example.com.
266266
*
267267
* # Delete all contributors and reassign their posts to user 2
268268
* $ wp user delete $(wp user list --role=contributor --field=ID) --reassign=2
269-
* Success: Removed user 813 from http://example.com
270-
* Success: Removed user 578 from http://example.com
269+
* Success: Removed user 813 from http://example.com.
270+
* Success: Removed user 578 from http://example.com.
271271
*
272272
* # Delete all contributors in batches of 100 (avoid error: argument list too long: wp)
273273
* $ wp user delete $(wp user list --role=contributor --field=ID | head -n 100)
@@ -979,9 +979,9 @@ public function list_caps( $args, $assoc_args ) {
979979
*
980980
* # Import users from local CSV file
981981
* $ wp user import-csv /path/to/users.csv
982-
* Success: bobjones created
983-
* Success: newuser1 created
984-
* Success: existinguser created
982+
* Success: bobjones created.
983+
* Success: newuser1 created.
984+
* Success: existinguser created.
985985
*
986986
* # Import users from remote CSV file
987987
* $ wp user import-csv http://example.com/users.csv
@@ -1178,20 +1178,26 @@ public function import_csv( $args, $assoc_args ) {
11781178
* Reset password for editor.
11791179
* Success: Passwords reset for 2 users.
11801180
*
1181+
* # Reset and display the password.
1182+
* $ wp user reset-password editor --show-password
1183+
* Reset password for editor.
1184+
* Password: N6hAau0fXZMN#rLCIirdEGOh
1185+
* Success: Password reset for 1 user.
1186+
*
11811187
* # Reset the password for one user, displaying only the new password, and not sending the change email.
11821188
* $ wp user reset-password admin --skip-email --porcelain
11831189
* yV6BP*!d70wg
11841190
*
11851191
* # Reset password for all users.
11861192
* $ wp user reset-password $(wp user list --format=ids)
1187-
* Reset password for admin
1188-
* Reset password for editor
1189-
* Reset password for subscriber
1193+
* Reset password for admin.
1194+
* Reset password for editor.
1195+
* Reset password for subscriber.
11901196
* Success: Passwords reset for 3 users.
11911197
*
11921198
* # Reset password for all users with a particular role.
11931199
* $ wp user reset-password $(wp user list --format=ids --role=administrator)
1194-
* Reset password for admin
1200+
* Reset password for admin.
11951201
* Success: Password reset for 1 user.
11961202
*
11971203
* @subcommand reset-password
@@ -1287,7 +1293,7 @@ public static function wp_new_user_notification( $user_id, $password ) {
12871293
*
12881294
* $ wp user spam 123
12891295
* User 123 marked as spam.
1290-
* Success: Spamed 1 of 1 users.
1296+
* Success: Spammed 1 of 1 users.
12911297
*/
12921298
public function spam( $args ) {
12931299
$this->update_msuser_status( $args, 'spam', '1' );

0 commit comments

Comments
 (0)