Conversation
Command: - wp user spam 123
Validations: - If user is super-user, then don't set as spam - Show warning if user is already reported as spam
|
I think we shouldn't try to use SQL as much as possible. |
|
yes, @miya0001 I just saw that function. Applying that only. |
|
Thanks @BhargavBhandari90 😄 |
|
Behat test for user.feature shows following error for
However, I am not getting this error while running command into the terminal. So I am confused, is my code has something wrong or what? |
84d5fac to
9244ffa
Compare
|
Ah, I guess we should do like following. |
|
@miya0001 Yes, see I just did that. That was real time 😛 Thank you for giving your time. |
|
Hi, If We need consistency between same commands, so following is a good example to handle multiple arguments. |
|
ok. Checking this. |
|
One test is failing. because I used a function which was not available in that WP version. Here is the error https://travis-ci.org/wp-cli/entity-command/jobs/271378052 |
|
Do you want to use |
@miya0001 As you said we need |
- made a common function for updating user data
51cc570 to
1f16271
Compare
|
Hi @miya0001
I have implemented this thing. But I don't know how to get return code so that I can add it into feature file. Currently, I am not adding that line into |
|
Please write test like following. |
|
Ah, sorry, it should be like following. |
|
@miya0001 This should be fine now. |
src/User_Command.php
Outdated
|
|
||
| // If site is not multisite, then stop execution. | ||
| if ( ! is_multisite() ) { | ||
| WP_CLI::error( 'Sorry! this command is for multisite only.' ); |
There was a problem hiding this comment.
This should mimic the other commands:
WP_CLI::error( 'This is not a multisite install.' );
|
The grammar is off for the batch results, but this needs to be fixed in |
wp user spam command
|
Thanks, @BhargavBhandari90 ! |
Command:
For : #50