Strip whitespace from email when logging in
Makes it a little easier to copy-paste credentials
This commit is contained in:
@@ -12,7 +12,7 @@ class SessionsController < ApplicationController
|
|||||||
path = params[:url].present? ? params[:url] : home_dashboard_index_path
|
path = params[:url].present? ? params[:url] : home_dashboard_index_path
|
||||||
begin
|
begin
|
||||||
# Normalize the email address, why not
|
# Normalize the email address, why not
|
||||||
user = User.authenticate(params[:email].to_s.downcase, params[:password])
|
user = User.authenticate(params[:email].to_s.strip.downcase, params[:password])
|
||||||
rescue RuntimeError => e
|
rescue RuntimeError => e
|
||||||
# don't do ANYTHING
|
# don't do ANYTHING
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user