lib/devise/hooks/confirmable.rb in shingara-devise-0.4.3 vs lib/devise/hooks/confirmable.rb in shingara-devise-0.4.3.1
- old
+ new
@@ -1,11 +1,11 @@
# Each time the user is set we verify if it is still able to really sign in.
# This is done by checking the time frame the user is able to sign in without
# confirming it's account. If the user has not confirmed it's account during
# this time frame, he/she will not able to sign in anymore.
-Warden::Manager.after_set_user do |record, auth, options|
+Warden::Manager.after_set_user do |record, warden, options|
if record && record.respond_to?(:active?) && !record.active?
scope = options[:scope]
- auth.logout(scope)
+ warden.logout(scope)
throw :warden, :scope => scope, :params => { :unconfirmed => true }
end
end