Allow password mail to be sent regardless of case

This commit is contained in:
Sebastian Serth
2021-01-27 18:10:52 +01:00
parent 229b274644
commit 470f4a3c1a

View File

@ -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