small refactorings in ApplicationController#omniauth_login

pull/1121/head
Philipp Tessenow 11 years ago committed by Michael Frister
parent 5a153029f5
commit 759775b37a
  1. 7
      app/controllers/account_controller.rb

@ -52,7 +52,10 @@ class AccountController < ApplicationController
if user.new_record?
# Self-registration off
redirect_to(signin_url) && return unless Setting.self_registration?
unless Setting.self_registration?
redirect_to(signin_url)
return
end
# Create on the fly
fill_user_fields_from_omniauth(user, auth_hash)
@ -63,7 +66,7 @@ class AccountController < ApplicationController
# Store a timestamp so we can later make sure that authentication information can
# only be reused for a short time.
session_info = auth_hash.merge({:omniauth => true, :timestamp => Time.new})
session_info = auth_hash.merge(omniauth: true, timestamp: Time.new)
onthefly_creation_failed(user, session_info)
end

Loading…
Cancel
Save