phacility/phabricator · warning · PhutilArgumentUsageException

Specify one or more email addresses to unverify.

Error message

Specify one or more email addresses to unverify.

What it means

`bin/mail unverify` requires at least one email address as a positional (wildcard) argument; with none it throws PhutilArgumentUsageException. The command exists to clear the verified flag on PhabricatorUserEmail addresses (e.g. so a user can re-verify), so an empty address list is meaningless.

Source

Thrown at src/applications/metamta/management/PhabricatorMailManagementUnverifyWorkflow.php:28

        pht('Unverify an email address so it no longer receives mail.'))
      ->setExamples('**unverify** __address__ ...')
      ->setArguments(
        array(
          array(
            'name' => 'addresses',
            'wildcard' => true,
            'help' => pht('Address (or addresses) to unverify.'),
          ),
        ));
  }

  public function execute(PhutilArgumentParser $args) {
    $console = PhutilConsole::getConsole();
    $viewer = $this->getViewer();

    $addresses = $args->getArg('addresses');
    if (!$addresses) {
      throw new PhutilArgumentUsageException(
        pht('Specify one or more email addresses to unverify.'));
    }

    foreach ($addresses as $address) {
      $email = id(new PhabricatorUserEmail())->loadOneWhere(
        'address = %s',
        $address);
      if (!$email) {
        echo tsprintf(
          "%s\n",
          pht(
            'Address "%s" is unknown.',
            $address));
        continue;
      }

      $user_phid = $email->getUserPHID();

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. Pass one or more addresses positionally: `bin/mail unverify user@example.com`.
  2. In scripts, assert the address list is non-empty before invoking.
  3. Check the address afterwards in the user's Settings → Email to confirm the flag cleared.

Example fix

// before
$ bin/mail unverify
// Exception: Specify one or more email addresses to unverify.

// after
$ bin/mail unverify alincoln@example.com
Defensive patterns

Strategy: validation

Validate before calling

if (empty($addresses)) {
  fwrite(STDERR, "unverify requires at least one address argument.\n");
  exit(1);
}

Prevention

When it happens

Trigger: Running `bin/mail unverify` bare; quoting mistakes that swallow the argument; scripts whose address variable was empty.

Common situations: Operators unfamiliar with the wildcard syntax putting the address behind a flag the parser does not define.

Related errors


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/bd437dde92b74455. Report an issue: GitHub.