OSDN Git Service
(root)
/
wvm
/
wvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5c51394
)
let the user know that --user_login= doesn't work
author
scribu
<mail@scribu.net>
Fri, 20 Dec 2013 23:59:49 +0000
(
01:59
+0200)
committer
scribu
<mail@scribu.net>
Fri, 20 Dec 2013 23:59:50 +0000
(
01:59
+0200)
see #926
php/commands/user.php
patch
|
blob
|
history
diff --git
a/php/commands/user.php
b/php/commands/user.php
index
9e02172
..
ddee96e
100644
(file)
--- a/
php/commands/user.php
+++ b/
php/commands/user.php
@@
-240,13
+240,15
@@
class User_Command extends \WP_CLI\CommandWithDBObject {
*
* ## EXAMPLES
*
*
* ## EXAMPLES
*
- * wp user update 123 --user_login=mary --display_name=Mary
- *
- * wp user update mary --user_pass=marypass
+ * wp user update 123 --display_name=Mary --user_pass=marypass
*/
public function update( $args, $assoc_args ) {
*/
public function update( $args, $assoc_args ) {
- $user_ids = array();
+ if ( isset( $assoc_args['user_login'] ) ) {
+ WP_CLI::warning( "User logins can't be changed." );
+ unset( $assoc_args['user_login'] );
+ }
+ $user_ids = array();
foreach ( $this->fetcher->get_many( $args ) as $user ) {
$user_ids[] = $user->ID;
}
foreach ( $this->fetcher->get_many( $args ) as $user ) {
$user_ids[] = $user->ID;
}