Skip to content

Can't use wp user spam *ID* on single site installation #412

@Rvervuurt

Description

@Rvervuurt

Bug Report

Describe the current, buggy behavior

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

Provide additional context/Screenshots

image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions