Module: Devise::Models::PasswordRequiresRegularUpdates

Extended by:
ActiveSupport::Concern
Defined in:
lib/devise/secure_password/models/password_requires_regular_updates.rb

Defined Under Namespace

Modules: ClassMethods Classes: ConfigurationError

Instance Method Summary collapse

Instance Method Details

#password_expired?Boolean

Returns:

  • (Boolean)


13
14
15
16
# File 'lib/devise/secure_password/models/password_requires_regular_updates.rb', line 13

def password_expired?
  last_password = previous_passwords.first
  inconsistent_password?(last_password) || last_password.stale?(self.class.password_maximum_age)
end