mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 01:31:35 +08:00
FIX: Prefer email when resetting password (#15650)
The UI used to request a password reset by username when the user was logged in. This did not work when hide_email_already_taken site setting was enabled, which disables the lookup-by-username functionality. This commit also introduces a check to ensure that the parameter is an email when hide_email_already_taken is enabled as the single allowed type is email (no usernames are allowed).
This commit is contained in:
@ -2068,7 +2068,7 @@ describe SessionController do
|
||||
post "/session/forgot_password.json",
|
||||
params: { login: user.username }
|
||||
|
||||
expect(response.status).to eq(200)
|
||||
expect(response.status).to eq(400)
|
||||
expect(Jobs::CriticalUserEmail.jobs.size).to eq(0)
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user