phacility/phabricator · error · PhutilArgumentUsageException

No user exists with username "%s".

Error message

No user exists with username "%s".

What it means

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.

Source

Thrown at src/applications/auth/management/PhabricatorAuthManagementUnlimitWorkflow.php:41

            'help' => pht('Reset all counters.'),
          ),
        ));
  }

  public function execute(PhutilArgumentParser $args) {
    $username = $args->getArg('user');
    if (!strlen($username)) {
      throw new PhutilArgumentUsageException(
        pht(
          'Use %s to choose a user to reset actions for.', '--user'));
    }

    $user = id(new PhabricatorPeopleQuery())
      ->setViewer($this->getViewer())
      ->withUsernames(array($username))
      ->executeOne();
    if (!$user) {
      throw new PhutilArgumentUsageException(
        pht(
          'No user exists with username "%s".',
          $username));
    }

    $all = $args->getArg('all');
    if (!$all) {
      // TODO: Eventually, let users reset specific actions. For now, we
      // require `--all` so that usage won't change when you can reset in a
      // more tailored way.
      throw new PhutilArgumentUsageException(
        pht(
          'Specify %s to reset all action counters.', '--all'));
    }

    $count = PhabricatorSystemActionEngine::resetActions(
      array(
        $user->getPHID(),

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. Confirm the exact username case-sensitively: `bin/user lookup <email>` or query `SELECT userName FROM user WHERE userName LIKE '%name%';`.
  2. Re-run with the exact username: `bin/auth unlimit --user <exact-username> --all`.
  3. If the user was renamed or disabled, use the current username; if deleted, the counters are irrelevant and no reset is needed.
  4. Check you are connected to the intended environment's database.

Example fix

// before
$ bin/auth unlimit --user 'Alice Smith' --all
No user exists with username "Alice Smith".

// after
$ bin/auth unlimit --user asmith --all
Defensive patterns

Strategy: validation

Validate before calling

$user = id(new PhabricatorPeopleQuery())
  ->setViewer(PhabricatorUser::getOmnipotentUser())
  ->withUsernames(array($username))
  ->executeOne();
if (!$user) {
  // resolve the exact username (case-sensitive) before running unlimit
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


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