From 84d8996addcabd810a06fa1c7750b43a76de1e2b Mon Sep 17 00:00:00 2001 From: Dave Ungerer Date: Fri, 13 Apr 2012 13:45:46 +0300 Subject: [PATCH] Password reset should be case insensitive on e-mail to match Authlogic default behaviour. --- app/controllers/password_resets_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/password_resets_controller.rb b/app/controllers/password_resets_controller.rb index c3e9565..322d232 100644 --- a/app/controllers/password_resets_controller.rb +++ b/app/controllers/password_resets_controller.rb @@ -7,7 +7,7 @@ def new end def create - @user = User.find_by_email(params[:email]) + @user = User.where("LOWER(email) = ?", params[:email]).first if @user @user.deliver_password_reset! flash[:notice] = "Instructions to reset your password have been emailed to you. " +