Sergey Biryukov d136e57d63 Users: Fetch user by login in retrieve_password() if not found by email.
This ensures that sending a password reset link works as expected if the user's login and email were initially the same, but the email address was subsequently updated and no longer matches the login, which is still set to the old address.

Follow-up to [6643], [18513], [19056], [37474], [50129], [50140].

Props donmhico, pbearne, azouamauriac, boblindner, daxelrod, audrasjb, SergeyBiryukov.
Fixes #53634.

git-svn-id: https://develop.svn.wordpress.org/trunk@54477 602fd350-edb4-49c9-b593-d223f7449a82
2022-10-11 13:43:20 +00:00
..