{"record":{"id":"bd437dde92b74455","repo":"phacility/phabricator","slug":"specify-one-or-more-email-addresses-to-unverify","errorCode":null,"errorMessage":"Specify one or more email addresses to unverify.","messagePattern":"Specify one or more email addresses to unverify\\.","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"warning","filePath":"src/applications/metamta/management/PhabricatorMailManagementUnverifyWorkflow.php","lineNumber":28,"sourceCode":"        pht('Unverify an email address so it no longer receives mail.'))\n      ->setExamples('**unverify** __address__ ...')\n      ->setArguments(\n        array(\n          array(\n            'name' => 'addresses',\n            'wildcard' => true,\n            'help' => pht('Address (or addresses) to unverify.'),\n          ),\n        ));\n  }\n\n  public function execute(PhutilArgumentParser $args) {\n    $console = PhutilConsole::getConsole();\n    $viewer = $this->getViewer();\n\n    $addresses = $args->getArg('addresses');\n    if (!$addresses) {\n      throw new PhutilArgumentUsageException(\n        pht('Specify one or more email addresses to unverify.'));\n    }\n\n    foreach ($addresses as $address) {\n      $email = id(new PhabricatorUserEmail())->loadOneWhere(\n        'address = %s',\n        $address);\n      if (!$email) {\n        echo tsprintf(\n          \"%s\\n\",\n          pht(\n            'Address \"%s\" is unknown.',\n            $address));\n        continue;\n      }\n\n      $user_phid = $email->getUserPHID();\n","sourceCodeStart":10,"sourceCodeEnd":46,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/metamta/management/PhabricatorMailManagementUnverifyWorkflow.php#L10-L46","documentation":"`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.","triggerScenarios":"Running `bin/mail unverify` bare; quoting mistakes that swallow the argument; scripts whose address variable was empty.","commonSituations":"Operators unfamiliar with the wildcard syntax putting the address behind a flag the parser does not define.","solutions":["Pass one or more addresses positionally: `bin/mail unverify user@example.com`.","In scripts, assert the address list is non-empty before invoking.","Check the address afterwards in the user's Settings → Email to confirm the flag cleared."],"exampleFix":"// before\n$ bin/mail unverify\n// Exception: Specify one or more email addresses to unverify.\n\n// after\n$ bin/mail unverify alincoln@example.com","handlingStrategy":"validation","validationCode":"if (empty($addresses)) {\n  fwrite(STDERR, \"unverify requires at least one address argument.\\n\");\n  exit(1);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pass addresses as positional arguments, not flags.","Assert non-empty address lists in scripts.","Verify the result in Settings → Email after running."],"tags":["php","phabricator","cli","argument-validation","email-verification"],"backgroundTag":"missing-cli-argument","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}