Sha256: b1bb42af383aff510370e966ba56dde3beb7d710feed3646379196ff0d72e35f

Contents?: true

Size: 264 Bytes

Versions: 6

Compression:

Stored size: 264 Bytes

Contents

Warden::Manager.after_set_user do |user, warden, _options|
  unless warden.env["CHECKING_PINFIRMABLE_PIN"] || !user.pinfirmable_pin.present?
    response = Rack::Response.new
    response.redirect "/users/confirmemail"
    throw :warden, response.finish
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
pinfirmable-0.1.5 lib/pinfirmable/hooks/pinfirmable.rb
pinfirmable-0.1.4 lib/pinfirmable/hooks/pinfirmable.rb
pinfirmable-0.1.3 lib/pinfirmable/hooks/pinfirmable.rb
pinfirmable-0.1.2 lib/pinfirmable/hooks/pinfirmable.rb
pinfirmable-0.1.1 lib/pinfirmable/hooks/pinfirmable.rb
pinfirmable-0.1.0 lib/pinfirmable/hooks/pinfirmable.rb