phacility/phabricator · warning · PhutilArgumentUsageException
No such user " " to recover.
Error message
No such user "%s" to recover.
What it means
PhabricatorPeopleQuery->withUsernames(array($username))->executeOne() returns null: the exact, case-sensitive username matches no Phabricator user account, so there is nothing to generate a recovery link for and the workflow aborts.
Solutions
- Verify the exact username spelling and case in the People application (or copy it from the user's profile URL).
- If the user was renamed, recover using the current username, not the old one.
- If no Phabricator account exists yet, create/import one first — recovery applies only to existing accounts.
Defensive patterns
Strategy: validation
Validate before calling
// Verify before invoking the workflow.
$user = id(new PhabricatorPeopleQuery())
->setViewer(PhabricatorUser::getOmnipotentUser())
->withUsernames(array($username))
->executeOne();
if (!$user) {
// fail early with 'unknown username' instead of running the workflow
} Prevention
- Copy-paste usernames from the People application or profile URL.
- Usernames are matched exactly, including case.
- Recovery applies only to existing Phabricator accounts, not directory-only names.
When it happens
Trigger: Typo or case mismatch in the username argument; the user was renamed, disabled, or deleted; attempting to recover a name that exists only in an external directory (LDAP/SSO) but has never logged in to create a Phabricator account.
Common situations: Case-sensitive username mismatches; retired/renamed accounts; assuming directory users exist in Phabricator before first login.
Understand the failure class
Background: "User not found", "Invalid user", and "does not exist": what missing-user lookup errors mean across Rocket.Chat, LiteLLM, Phabricator, rustfs, and pnpm — this error's family across 10 libraries.
Related errors
- No such user " "!
- No such user " " exists.
- No such user ' ' exists.
- No user with username
- No user with username
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/87c13b3f1b49998b.
Report an issue: GitHub.
Appendix: source
Thrown at src/applications/auth/management/PhabricatorAuthManagementRecoverWorkflow.php:46
public function execute(PhutilArgumentParser $args) {
$usernames = $args->getArg('username');
if (!$usernames) {
throw new PhutilArgumentUsageException(
pht('You must specify the username of the account to recover.'));
} else if (count($usernames) > 1) {
throw new PhutilArgumentUsageException(
pht('You can only recover the username for one account.'));
}
$username = head($usernames);
$user = id(new PhabricatorPeopleQuery())
->setViewer($this->getViewer())
->withUsernames(array($username))
->executeOne();
if (!$user) {
throw new PhutilArgumentUsageException(
pht(
'No such user "%s" to recover.',
$username));
}
if (!$user->canEstablishWebSessions()) {
throw new PhutilArgumentUsageException(
pht(
'This account ("%s") can not establish web sessions, so it is '.
'not possible to generate a functional recovery link. Special '.
'accounts like daemons and mailing lists can not log in via the '.
'web UI.',
$username));
}
$force_full_session = $args->getArg('force-full-session');
$engine = new PhabricatorAuthSessionEngine();View on GitHub (pinned to 5720a38cfe)