mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Update activatable.rb
This commit is contained in:
parent
8b3b3d7955
commit
2bde395840
1 changed files with 3 additions and 4 deletions
|
@ -1,7 +1,6 @@
|
|||
# Deny user access whenever their account is not active yet. All strategies that inherits from
|
||||
# Devise::Strategies::Authenticatable and uses the validate already check if the user is active_for_authentication?
|
||||
# before actively signing them in. However, we need this as hook to validate the user activity
|
||||
# in each request and in case the user is using other strategies beside Devise ones.
|
||||
# Deny user access whenever their account is not active yet.
|
||||
# We need this as hook to validate the user activity on each request
|
||||
# and in case the user is using other strategies beside Devise ones.
|
||||
Warden::Manager.after_set_user do |record, warden, options|
|
||||
if record && record.respond_to?(:active_for_authentication?) && !record.active_for_authentication?
|
||||
scope = options[:scope]
|
||||
|
|
Loading…
Add table
Reference in a new issue