Method: Devise::Models::Confirmable#active_for_authentication?
- Defined in:
- lib/devise/models/confirmable.rb
#active_for_authentication? ⇒ Boolean
Overwrites active_for_authentication? for confirmation by verifying whether a user is active to sign in or not. If the user is already confirmed, it should never be blocked. Otherwise we need to calculate if the confirm time has not expired for this user.
144 145 146 |
# File 'lib/devise/models/confirmable.rb', line 144 def active_for_authentication? super && (!confirmation_required? || confirmed? || confirmation_period_valid?) end |