diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2013-03-06 08:42:00 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2013-03-06 08:42:00 +0000 |
commit | 5984adc3df468e4c5def1d15cb1520f5b20f852b (patch) | |
tree | 7d4d9fdf5bb318f817c7dea52ad8087ce09a64c4 /app/controllers | |
parent | 6a4966fe10e860ea86a5acb2bd45b34279466223 (diff) | |
download | redmine-5984adc3df468e4c5def1d15cb1520f5b20f852b.tar.gz redmine-5984adc3df468e4c5def1d15cb1520f5b20f852b.zip |
code layout cleanup AccountController#open_id_authenticate
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11539 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/account_controller.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index 57d0c2004..5b8122b6e 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -177,21 +177,21 @@ class AccountController < ApplicationController def open_id_authenticate(openid_url) back_url = signin_url(:autologin => params[:autologin]) - - authenticate_with_open_id(openid_url, :required => [:nickname, :fullname, :email], :return_to => back_url, :method => :post) do |result, identity_url, registration| + authenticate_with_open_id( + openid_url, :required => [:nickname, :fullname, :email], + :return_to => back_url, :method => :post + ) do |result, identity_url, registration| if result.successful? user = User.find_or_initialize_by_identity_url(identity_url) if user.new_record? # Self-registration off (redirect_to(home_url); return) unless Setting.self_registration? - # Create on the fly user.login = registration['nickname'] unless registration['nickname'].nil? user.mail = registration['email'] unless registration['email'].nil? user.firstname, user.lastname = registration['fullname'].split(' ') unless registration['fullname'].nil? user.random_password user.register - case Setting.self_registration when '1' register_by_email_activation(user) do |