lib/authlogic/session/magic_columns.rb in kschrader-authlogic-2.1.2 vs lib/authlogic/session/magic_columns.rb in kschrader-authlogic-2.1.3
- old
+ new
@@ -50,11 +50,11 @@
record.login_count = (record.login_count.blank? ? 1 : record.login_count + 1) if record.respond_to?(:login_count)
record.failed_login_count = 0 if record.respond_to?(:failed_login_count)
if record.respond_to?(:current_login_at)
record.last_login_at = record.current_login_at if record.respond_to?(:last_login_at)
- record.current_login_at = klass.default_timezone == :utc ? Time.zone.now.utc : Time.zone.now
+ record.current_login_at = Time.zone.now
end
if record.respond_to?(:current_login_ip)
record.last_login_ip = record.current_login_ip if record.respond_to?(:last_login_ip)
record.current_login_ip = controller.request.remote_ip
@@ -80,10 +80,10 @@
return controller.last_request_update_allowed? if controller.responds_to_last_request_update_allowed?
record.last_request_at.blank? || last_request_at_threshold.to_i.seconds.ago >= record.last_request_at
end
def set_last_request_at
- record.last_request_at = klass.default_timezone == :utc ? Time.zone.now.utc : Time.zone.now
+ record.last_request_at = Time.zone.now
end
def last_request_at_threshold
self.class.last_request_at_threshold
end
\ No newline at end of file