lib/sorcery/model/submodules/brute_force_protection.rb
# Called by the controller to increment the failed logins counter.
# Calls 'lock!' if login retries limit was reached.
Called by the controller to increment the failed logins counter.
Calls 'lock!' if login retries limit was reached.
Called by the controller to increment the failed logins counter . Calls ' lock! ' if login retries limit was reached .
def register_failed_login!
            config = sorcery_config
            return if !unlocked?
            self.increment(config.failed_logins_count_attribute_name)
            self.save!(:validate => false)
            self.lock! if self.send(config.failed_logins_count_attribute_name) >= config.consecutive_login_retries_amount_limit
          end
def register_failed_login! config = sorcery_config return if ! unlocked? self . increment ( config . failed_logins_count_attribute_name ) self . save! ( :validate => false ) self . lock! if self . send ( config . failed_logins_count_attribute_name ) >= config . consecutive_login_retries_amount_limit end
Called by the controller to increment the failed logins counter.
Called by the controller to increment the failed logins counter .