{"record":{"id":"71f52841b4ac9f70","repo":"phacility/phabricator","slug":"you-must-specify-the-email-to-verify","errorCode":null,"errorMessage":"You must specify the email to verify.","messagePattern":"You must specify the email to verify\\.","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"error","filePath":"src/applications/auth/management/PhabricatorAuthManagementVerifyWorkflow.php","lineNumber":27,"sourceCode":"      ->setExamples('**verify** __email__')\n      ->setSynopsis(\n        pht(\n          'Verify an unverified email address which is already attached to '.\n          'an account. This will also re-execute event hooks for addresses '.\n          'which are already verified.'))\n      ->setArguments(\n        array(\n          array(\n            'name' => 'email',\n            'wildcard' => true,\n          ),\n        ));\n  }\n\n  public function execute(PhutilArgumentParser $args) {\n    $emails = $args->getArg('email');\n    if (!$emails) {\n      throw new PhutilArgumentUsageException(\n        pht('You must specify the email to verify.'));\n    } else if (count($emails) > 1) {\n      throw new PhutilArgumentUsageException(\n        pht('You can only verify one address at a time.'));\n    }\n    $address = head($emails);\n\n    $email = id(new PhabricatorUserEmail())->loadOneWhere(\n      'address = %s',\n      $address);\n    if (!$email) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'No email exists with address \"%s\"!',\n          $address));\n    }\n\n    $viewer = $this->getViewer();","sourceCodeStart":9,"sourceCodeEnd":45,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/auth/management/PhabricatorAuthManagementVerifyWorkflow.php#L9-L45","documentation":"Thrown by `bin/auth verify` when no email address argument is supplied. The workflow defines 'email' as a wildcard argument and requires at least one value before it can look up the PhabricatorUserEmail record to mark verified. It is a usage error raised before any database query.","triggerScenarios":"Running `bin/auth verify` with no arguments, or via a script where the interpolated address variable is empty.","commonSituations":"Automation wraps the command with a variable that is unset; the operator expects a prompt; whitespace/quoting mistakes cause the argument to be dropped.","solutions":["Re-run with exactly one address: `bin/auth verify <user@example.com>`.","In scripts, assert the variable is non-empty before invoking.","Run `bin/auth help verify` to confirm the wildcard argument form."],"exampleFix":"// before\n$ bin/auth verify\nYou must specify the email to verify.\n\n// after\n$ bin/auth verify alice@example.com","handlingStrategy":"validation","validationCode":"// Shell guard before invoking\nif [ -z \"$EMAIL\" ]; then echo \"address required\" >&2; exit 2; fi\nbin/auth verify \"$EMAIL\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pass exactly one address as the wildcard argument.","Assert the address variable is non-empty in wrapper scripts.","Prefer `bin/auth help verify` to reconfirm the argument shape after upgrades."],"tags":["phabricator","cli","email","usage-exception","missing-argument"],"backgroundTag":"missing-cli-argument","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}