{"record":{"id":"69645e78fdd2cbfd","repo":"phacility/phabricator","slug":"use-user-username-to-specify-which-user-to-s","errorCode":null,"errorMessage":"Use \"--user <username>\" to specify which user to strip factors from, or \"--all-users\" to strip factors from all users.","messagePattern":"Use \"--user <username>\" to specify which user to strip factors from, or \"--all-users\" to strip factors from all users\\.","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"error","filePath":"src/applications/auth/management/PhabricatorAuthManagementStripWorkflow.php","lineNumber":68,"sourceCode":"          ),\n        ));\n  }\n\n  public function execute(PhutilArgumentParser $args) {\n    $viewer = $this->getViewer();\n\n    $usernames = $args->getArg('user');\n    $all_users = $args->getArg('all-users');\n\n    if ($usernames && $all_users) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Specify either specific users with %s, or all users with '.\n          '%s, but not both.',\n          '--user',\n          '--all-users'));\n    } else if (!$usernames && !$all_users) {\n      throw new PhutilArgumentUsageException(\n        pht(\n          'Use \"--user <username>\" to specify which user to strip factors '.\n          'from, or \"--all-users\" to strip factors from all users.'));\n    } else if ($usernames) {\n      $users = id(new PhabricatorPeopleQuery())\n        ->setViewer($this->getViewer())\n        ->withUsernames($usernames)\n        ->execute();\n\n      $users_by_username = mpull($users, null, 'getUsername');\n      foreach ($usernames as $username) {\n        if (empty($users_by_username[$username])) {\n          throw new PhutilArgumentUsageException(\n            pht(\n              'No user exists with username \"%s\".',\n              $username));\n        }\n      }","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/auth/management/PhabricatorAuthManagementStripWorkflow.php#L50-L86","documentation":"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.","triggerScenarios":"Thrown at src/applications/auth/management/PhabricatorAuthManagementStripWorkflow.php:68 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}