HomePhabricator

Do not ask for password if user does not exist

Authored by jayvdb.

Description

Do not ask for password if user does not exist

When a password is not in the password file, or the login
failed for an unknown reason, check the user exists using
API allusers before halting to request the user enter a
password for a user which may not exist.

This allows a graceful error when an invalid username
is configured for a site, instead of halting for user
input which may not be possible if automated process,
and will be useless anyway as the user does not exist.

This may occur if a username is set for all sites in a
family, if the user does not exist on all sites, which
can be a problem the user cant fix when a site in the
family is 'closed' preventing new account registrations.

Bug: T74674
Bug: T85786
Bug: T100802
Change-Id: Ibab1846d71bdd5c6c457630078996911ea94af9d