Changing default timeout to 30.minutes.

This commit is contained in:
Carlos Antonio da Silva
2009-11-23 23:28:04 -02:00
parent a88731bb93
commit 7f4bc8973a
2 changed files with 2 additions and 2 deletions

View File

@@ -47,7 +47,7 @@ module Devise
# Time interval to timeout the user session without activity.
mattr_accessor :timeout
@@timeout = 10.minutes
@@timeout = 30.minutes
# Used to define the password encryption algorithm.
mattr_accessor :encryptor

View File

@@ -4,7 +4,7 @@
# record is set, we set the last request time inside it's scoped session to
# verify timeout in the following request.
Warden::Manager.after_set_user do |record, warden, options|
if record.present? && record.respond_to?(:timeout?)
if record && record.respond_to?(:timeout?)
scope = options[:scope]
# Record may have already been logged out by another hook (ie confirmable).
if warden.authenticated?(scope)