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:
parent
6be0e335fb
commit
0844a22b02
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue