Allow sign in via case insensitive email address
This commit is contained in:
@ -2,7 +2,7 @@ class InternalUser < User
|
|||||||
|
|
||||||
authenticates_with_sorcery!
|
authenticates_with_sorcery!
|
||||||
|
|
||||||
validates :email, presence: true, uniqueness: true
|
validates :email, presence: true, uniqueness: true, case_sensitive: false
|
||||||
validates :password, confirmation: true, if: :password_void?, on: :update, presence: true
|
validates :password, confirmation: true, if: :password_void?, on: :update, presence: true
|
||||||
validates :role, inclusion: {in: ROLES}
|
validates :role, inclusion: {in: ROLES}
|
||||||
|
|
||||||
|
@ -158,7 +158,7 @@ Rails.application.config.sorcery.configure do |config|
|
|||||||
# downcase the username before trying to authenticate, default is false
|
# downcase the username before trying to authenticate, default is false
|
||||||
# Default: `false`
|
# Default: `false`
|
||||||
#
|
#
|
||||||
# user.downcase_username_before_authenticating =
|
user.downcase_username_before_authenticating = true
|
||||||
|
|
||||||
|
|
||||||
# change default email attribute.
|
# change default email attribute.
|
||||||
|
Reference in New Issue
Block a user