mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Email should be case insensitive, closes #372
This commit is contained in:
parent
2602ef41cf
commit
ebe3e791d6
2 changed files with 2 additions and 1 deletions
|
@ -11,6 +11,7 @@
|
||||||
* Devise should respect script_name and path_info contracts
|
* Devise should respect script_name and path_info contracts
|
||||||
* Fix a bug when accessing a path with (.:format) (by github.com/klacointe)
|
* Fix a bug when accessing a path with (.:format) (by github.com/klacointe)
|
||||||
* Do not add unlock routes unless unlock strategy is email or both
|
* Do not add unlock routes unless unlock strategy is email or both
|
||||||
|
* Email should be case insensitive
|
||||||
|
|
||||||
* deprecations
|
* deprecations
|
||||||
* use_default_scope is deprecated and has no effect. Use :as or :devise_scope in the router instead
|
* use_default_scope is deprecated and has no effect. Use :as or :devise_scope in the router instead
|
||||||
|
|
|
@ -16,7 +16,7 @@ module Devise
|
||||||
|
|
||||||
base.class_eval do
|
base.class_eval do
|
||||||
validates_presence_of :email
|
validates_presence_of :email
|
||||||
validates_uniqueness_of :email, :scope => authentication_keys[1..-1], :allow_blank => true
|
validates_uniqueness_of :email, :scope => authentication_keys[1..-1], :case_sensitive => false, :allow_blank => true
|
||||||
validates_format_of :email, :with => email_regexp, :allow_blank => true
|
validates_format_of :email, :with => email_regexp, :allow_blank => true
|
||||||
|
|
||||||
with_options :if => :password_required? do |v|
|
with_options :if => :password_required? do |v|
|
||||||
|
|
Loading…
Reference in a new issue