{"record":{"id":"9d989554ea05cc56","repo":"phacility/phabricator","slug":"no-user-exists-with-username-s-9d9895","errorCode":null,"errorMessage":"No user exists with username \"%s\".","messagePattern":"No user exists with username \"(.+?)\"\\.","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"error","filePath":"src/applications/auth/management/PhabricatorAuthManagementUnlimitWorkflow.php","lineNumber":41,"sourceCode":"            'help' => pht('Reset all counters.'),\n          ),\n        ));\n  }\n\n  public function execute(PhutilArgumentParser $args) {\n    $username = $args->getArg('user');\n    if (!strlen($username)) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Use %s to choose a user to reset actions for.', '--user'));\n    }\n\n    $user = id(new PhabricatorPeopleQuery())\n      ->setViewer($this->getViewer())\n      ->withUsernames(array($username))\n      ->executeOne();\n    if (!$user) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'No user exists with username \"%s\".',\n          $username));\n    }\n\n    $all = $args->getArg('all');\n    if (!$all) {\n      // TODO: Eventually, let users reset specific actions. For now, we\n      // require `--all` so that usage won't change when you can reset in a\n      // more tailored way.\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Specify %s to reset all action counters.', '--all'));\n    }\n\n    $count = PhabricatorSystemActionEngine::resetActions(\n      array(\n        $user->getPHID(),","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/auth/management/PhabricatorAuthManagementUnlimitWorkflow.php#L23-L59","documentation":"Thrown by `bin/auth unlimit` when the `--user` value matches no Phabricator user. The workflow resolves the username via PhabricatorPeopleQuery->withUsernames()->executeOne(); when the query returns null the command aborts with this PhutilArgumentUsageException before resetting any rate-limit counters. Usernames are matched exactly, including case.","triggerScenarios":"Running `bin/auth unlimit --user <name>` where <name> is not an existing username: typo, wrong case, an email address or real name supplied instead of the username, or a user that was renamed/disabled/deleted.","commonSituations":"Admin pastes the user's email or display name instead of the account username; username has different capitalization; the account was renamed after a directory sync; the operator is on the wrong environment whose user table differs.","solutions":["Confirm the exact username case-sensitively: `bin/user lookup <email>` or query `SELECT userName FROM user WHERE userName LIKE '%name%';`.","Re-run with the exact username: `bin/auth unlimit --user <exact-username> --all`.","If the user was renamed or disabled, use the current username; if deleted, the counters are irrelevant and no reset is needed.","Check you are connected to the intended environment's database."],"exampleFix":"// before\n$ bin/auth unlimit --user 'Alice Smith' --all\nNo user exists with username \"Alice Smith\".\n\n// after\n$ bin/auth unlimit --user asmith --all","handlingStrategy":"validation","validationCode":"$user = id(new PhabricatorPeopleQuery())\n  ->setViewer(PhabricatorUser::getOmnipotentUser())\n  ->withUsernames(array($username))\n  ->executeOne();\nif (!$user) {\n  // resolve the exact username (case-sensitive) before running unlimit\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy usernames from the user's profile URL, not from display names or emails.","Usernames are matched case-sensitively — verify exact casing first.","When scripting, validate the username against the API/database before running the command."],"tags":["phabricator","cli","usage-exception","record-not-found"],"backgroundTag":"entity-not-found","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}