You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Can't use wp user spam *ID* on single site installation #412
I'm trying to mark a user as spam with wp user spam *ID*, but I get the error Error: This is not a multisite installation.
Describe how other contributors can replicate this bug
Create a clean WP installation
Generate some users with wp user generate
Try to mark a random user (f.ex. 50) as spam with wp user spam 50
Describe what you would expect as the correct outcome
I expect user 50 to be registered as spam, as the (docs)[https://developer.wordpress.org/cli/commands/user/spam/] make me think it should, no matter if it's a multiste or not.
Let us know what environment you are running this on
OS: Darwin 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar 6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000 arm64
Shell: /bin/zsh
PHP binary: /opt/homebrew/Cellar/php@8.1/8.1.21/bin/php
PHP version: 8.1.21
php.ini used: /opt/homebrew/etc/php/8.1/php.ini
MySQL binary:
MySQL version:
SQL modes:
WP-CLI root dir: phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir: phar://wp-cli.phar/vendor
WP_CLI phar path: /Applications/MAMP/htdocs/ideal/wordpress
WP-CLI packages dir:
WP-CLI cache dir: /Users/robbert/.wp-cli/cache
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 2.8.1
Activity
danielbachhuber commentedon Jul 13, 2023
Hey @Rvervuurt,
The concept of marking a user as spam only exists in WordPress multisite:
Multisite
Standard
Whenever relevant, WP-CLI emulates wp-admin, so this isn't behavior we'll change.
How would you recommend we improve the documentation? Want to submit a PR with your suggested changes?
entity-command/src/User_Command.php
Lines 1214 to 1248 in 5c14109
Rvervuurt commentedon Jul 13, 2023
Ah that makes sense! I didn't know it was multisite-only!
There must be other multisite-commands, how are they documented?
danielbachhuber commentedon Jul 13, 2023
@Rvervuurt That's a good question. They generally aren't explicitly documented as such, but usually have some reference to multisite:
entity-command/src/Site_Command.php
Line 11 in 5c14109
We could say something like:
Or:
Do you have a preference? Or another suggestion?