From 470f4a3c1af5770fc295c6818217be707c567b0a Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Wed, 27 Jan 2021 18:10:52 +0100 Subject: [PATCH] Allow password mail to be sent regardless of case --- app/controllers/internal_users_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/internal_users_controller.rb b/app/controllers/internal_users_controller.rb index fcf3d5f3..90c390e1 100644 --- a/app/controllers/internal_users_controller.rb +++ b/app/controllers/internal_users_controller.rb @@ -40,7 +40,8 @@ class InternalUsersController < ApplicationController def deliver_reset_password_instructions if params[:email].present? - InternalUser.find_by(email: params[:email]).try(:deliver_reset_password_instructions!) + user = InternalUser.arel_table + InternalUser.where(user[:email].matches(params[:email])).first&.deliver_reset_password_instructions! redirect_to(:root, notice: t('.success')) end end