Skip to content

Commit

Permalink
user.php: dots
Browse files Browse the repository at this point in the history
  • Loading branch information
scribu committed Feb 19, 2012
1 parent 92b3be4 commit 0eb538a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/php/wp-cli/commands/internals/user.php
Expand Up @@ -71,9 +71,9 @@ public function delete( $args, $assoc_args ) {
extract( wp_parse_args( $assoc_args, $defaults ), EXTR_SKIP );

if ( wp_delete_user( $user_id, $reassign ) ) {
WP_CLI::success( "Deleted user $user_id" );
WP_CLI::success( "Deleted user $user_id." );
} else {
WP_CLI::error( "Failed deleting user $user_id" );
WP_CLI::error( "Failed deleting user $user_id." );
}
}

Expand Down Expand Up @@ -126,7 +126,7 @@ public function create( $args, $assoc_args ) {
}
}

WP_CLI::success( "Created user $user_id" );
WP_CLI::success( "Created user $user_id." );
}

/**
Expand All @@ -139,21 +139,21 @@ public function update( $args, $assoc_args ) {
$user_id = $args[0];

if ( ! is_numeric($user_id) ) {
WP_CLI::error( "User ID required (see 'wp user help')" );
WP_CLI::error( "User ID required (see 'wp user help')." );
}

if ( ! count($assoc_args) ) {
WP_CLI::error( "Need some fields to update" );
if ( empty( $assoc_args ) ) {
WP_CLI::error( "Need some fields to update." );
}

$params = array_merge( array('ID' => $user_id), $assoc_args );
$params = array_merge( array( 'ID' => $user_id ), $assoc_args );

$updated_id = wp_update_user( $params );

if ( is_wp_error($updated_id) ) {
if ( is_wp_error( $updated_id ) ) {
WP_CLI::error( $updated_id );
} else {
WP_CLI::success( "Updated user $updated_id" );
WP_CLI::success( "Updated user $updated_id." );
}
}

Expand Down

0 comments on commit 0eb538a

Please sign in to comment.