Sha256: f72639224d8732dc624d33cbd0dd048d61cdd16b26ce1993ae7a11f364b87558

Contents?: true

Size: 541 Bytes

Versions: 22

Compression:

Stored size: 541 Bytes

Contents

# frozen_string_literal: true

# After each sign in, update sign in time, sign in count and sign in IP.
# This is only triggered when the user is explicitly set (with set_user)
# and on authentication. Retrieving the user from session (:fetch) does
# not trigger it.
Warden::Manager.after_set_user except: :fetch do |record, warden, options|
  if record.respond_to?(:update_tracked_fields!) && warden.authenticated?(options[:scope]) && !warden.request.env['devise.skip_trackable']
    record.update_tracked_fields!(warden.request)
  end
end

Version data entries

22 entries across 22 versions & 3 rubygems

Version Path
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/devise-4.9.4/lib/devise/hooks/trackable.rb
devise-4.9.4 lib/devise/hooks/trackable.rb
devise-4.9.3 lib/devise/hooks/trackable.rb
devise-4.9.2 lib/devise/hooks/trackable.rb
devise-4.9.1 lib/devise/hooks/trackable.rb
devise-4.9.0 lib/devise/hooks/trackable.rb
devise-4.8.1 lib/devise/hooks/trackable.rb
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/devise-4.8.0/lib/devise/hooks/trackable.rb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/devise-4.8.0/lib/devise/hooks/trackable.rb
devise-4.8.0 lib/devise/hooks/trackable.rb
devise-4.7.3 lib/devise/hooks/trackable.rb
devise-4.7.2 lib/devise/hooks/trackable.rb
devise-4.7.1 lib/devise/hooks/trackable.rb
devise-4.7.0 lib/devise/hooks/trackable.rb
devise-4.6.2 lib/devise/hooks/trackable.rb
devise-4.6.1 lib/devise/hooks/trackable.rb
devise-4.6.0 lib/devise/hooks/trackable.rb
devise-4.5.0 lib/devise/hooks/trackable.rb
devise-4.4.3 lib/devise/hooks/trackable.rb
devise-4.4.2 lib/devise/hooks/trackable.rb