X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/f249245135c8ed85562a89923da19564e644a32d..f70ec189894ef6bc37355cad7990420065a0b2cb:/app/controllers/users_controller.rb diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index b3596b376..aa115a228 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -146,11 +146,11 @@ class UsersController < ApplicationController def lost_password @title = t "users.lost_password.title" - if params[:user] && params[:user][:email] - user = User.visible.find_by(:email => params[:user][:email]) + if params[:email] + user = User.visible.find_by(:email => params[:email]) if user.nil? - users = User.visible.where("LOWER(email) = LOWER(?)", params[:user][:email]) + users = User.visible.where("LOWER(email) = LOWER(?)", params[:email]) user = users.first if users.count == 1 end