mirror of
https://github.com/fspc/BikeShed-1.git
synced 2026-09-16 08:31:36 -04:00
Merge branch 'master' into denney-new-user-form
Conflicts: db/schema.rb
This commit is contained in:
@@ -38,12 +38,12 @@ Devise.setup do |config|
|
||||
# Configure which authentication keys should be case-insensitive.
|
||||
# These keys will be downcased upon creating or modifying a user and when used
|
||||
# to authenticate or find a user. Default is :email.
|
||||
config.case_insensitive_keys = [ :email ]
|
||||
config.case_insensitive_keys = [ :username ]
|
||||
|
||||
# Configure which authentication keys should have whitespace stripped.
|
||||
# These keys will have whitespace before and after removed upon creating or
|
||||
# modifying a user and when used to authenticate or find a user. Default is :email.
|
||||
config.strip_whitespace_keys = [ :email ]
|
||||
config.strip_whitespace_keys = [ :username ]
|
||||
|
||||
# Tell if authentication through request.params is enabled. True by default.
|
||||
# It can be set to an array that will enable params authentication only for the
|
||||
@@ -221,3 +221,9 @@ Devise.setup do |config|
|
||||
# manager.default_strategies(:scope => :user).unshift :some_external_strategy
|
||||
# end
|
||||
end
|
||||
|
||||
#Check in the user if they sign in. (Devise uses Warden)
|
||||
Warden::Manager.after_authentication do |user,auth,opts|
|
||||
user.checkin unless user.checked_in?
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user