lib/authlogic_connect/common/user.rb in authlogic-connect-0.0.5.1 vs lib/authlogic_connect/common/user.rb in authlogic-connect-0.0.6
- old
+ new
@@ -58,11 +58,11 @@
options = {} if options == false
options[:validate] = true unless options.has_key?(:validate)
save_options = ActiveRecord::VERSION::MAJOR < 3 ? options[:validate] : options
# kill the block if we're starting authentication
- authenticate_via_protocol(block_given?, options) do |redirecting|
- block = nil if redirecting
+ authenticate_via_protocol(block_given?, options) do |start_authentication|
+ block = nil if start_authentication # redirecting
# forces you to validate, only if a block is given
result = super(save_options) # validate!
unless block.nil?
cleanup_authentication_session(options)
yield(result)