Skip to content
This repository was archived by the owner on Oct 16, 2024. It is now read-only.
This repository was archived by the owner on Oct 16, 2024. It is now read-only.

Enhancement to remove-user sub command #162

@mdrovdahl

Description

@mdrovdahl

Some sites may have disabled the Jetpack JSON API module, meaning that we can't search their users for purposes of user removal:

markd@MBP14 team51-cli % BEARER='[REDACTED_TOKEN]'; curl -sH 'Accept: application/json' -H 'Authorization: Bearer '$BEARER 'https://public-api.wordpress.com/rest/v1.1/sites/[REDACTED_BLOG_ID]/users/?search=[REDACTED_EMAIL_ADDRESS]&search_columns=user_email&fields=ID,email,site_ID,URL' 2>/dev/null | jq .
{
  "error": "unauthorized",
  "message": "API calls to this blog have been disabled."
} 

In an ideal world, when we receive this response, we would alert the CLI user which site(s) have been skipped so that they can manually process removals.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions