]> source.dussan.org Git - redmine.git/commitdiff
Refactor: Use the existing method for failing onthefly creations.
authorEric Davis <edavis@littlestreamsoftware.com>
Sun, 20 Dec 2009 20:13:50 +0000 (20:13 +0000)
committerEric Davis <edavis@littlestreamsoftware.com>
Sun, 20 Dec 2009 20:13:50 +0000 (20:13 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3208 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/account_controller.rb

index 674045f73c21416f0effa40d157ab4093e507e42..c75f64e1b6fa2599482cc75bc0ee66772a2dd175 100644 (file)
@@ -141,10 +141,7 @@ class AccountController < ApplicationController
       # Invalid credentials
       flash.now[:error] = l(:notice_account_invalid_creditentials)
     elsif user.new_record?
-      # Onthefly creation failed, display the registration form to fill/fix attributes
-      @user = user
-      session[:auth_source_registration] = {:login => user.login, :auth_source_id => user.auth_source_id }
-      render :action => 'register'
+      onthefly_creation_failed(user, {:login => user.login, :auth_source_id => user.auth_source_id })
     else
       # Valid user
       successful_authentication(user)