phacility/phabricator · error · PhutilArgumentUsageException

Use "--user <username>" to specify which user to strip facto

Error message

Use "--user <username>" to specify which user to strip factors from, or "--all-users" to strip factors from all users.

What it means

Error "Use "--user <username>" to specify which user to strip factors from, or "--all-users" to strip factors from all users." thrown in phacility/phabricator.

Source

Thrown at src/applications/auth/management/PhabricatorAuthManagementStripWorkflow.php:68

          ),
        ));
  }

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

    $usernames = $args->getArg('user');
    $all_users = $args->getArg('all-users');

    if ($usernames && $all_users) {
      throw new PhutilArgumentUsageException(
        pht(
          'Specify either specific users with %s, or all users with '.
          '%s, but not both.',
          '--user',
          '--all-users'));
    } else if (!$usernames && !$all_users) {
      throw new PhutilArgumentUsageException(
        pht(
          'Use "--user <username>" to specify which user to strip factors '.
          'from, or "--all-users" to strip factors from all users.'));
    } else if ($usernames) {
      $users = id(new PhabricatorPeopleQuery())
        ->setViewer($this->getViewer())
        ->withUsernames($usernames)
        ->execute();

      $users_by_username = mpull($users, null, 'getUsername');
      foreach ($usernames as $username) {
        if (empty($users_by_username[$username])) {
          throw new PhutilArgumentUsageException(
            pht(
              'No user exists with username "%s".',
              $username));
        }
      }

View on GitHub (pinned to 5720a38cfe)

When it happens

Trigger: Thrown at src/applications/auth/management/PhabricatorAuthManagementStripWorkflow.php:68 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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