Refactor: Use the existing method for failing onthefly creations.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3208 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis 2009-12-20 20:13:50 +00:00
parent 6be0e335fb
commit 0844a22b02
1 changed files with 1 additions and 4 deletions

View File

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