Show more informative error to users signing in with Google

This commit is contained in:
Omar Roth 2018-12-20 15:39:41 -06:00
parent a160c645c9
commit 1360d67c11

View file

@ -951,7 +951,7 @@ post "/login" do |env|
end
if action == "signin"
user = PG_DB.query_one?("SELECT * FROM users WHERE LOWER(email) = LOWER($1) AND password IS NOT NULL", email, as: User)
user = PG_DB.query_one?("SELECT * FROM users WHERE LOWER(email) = LOWER($1)", email, as: User)
if !user
error_message = translate(locale, "Invalid username or password")