Extract method
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3209 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
0844a22b02
commit
c478fa7f90
|
@ -137,9 +137,9 @@ class AccountController < ApplicationController
|
||||||
|
|
||||||
def password_authentication
|
def password_authentication
|
||||||
user = User.try_to_login(params[:username], params[:password])
|
user = User.try_to_login(params[:username], params[:password])
|
||||||
|
|
||||||
if user.nil?
|
if user.nil?
|
||||||
# Invalid credentials
|
invalid_credentials
|
||||||
flash.now[:error] = l(:notice_account_invalid_creditentials)
|
|
||||||
elsif user.new_record?
|
elsif user.new_record?
|
||||||
onthefly_creation_failed(user, {:login => user.login, :auth_source_id => user.auth_source_id })
|
onthefly_creation_failed(user, {:login => user.login, :auth_source_id => user.auth_source_id })
|
||||||
else
|
else
|
||||||
|
@ -209,6 +209,10 @@ class AccountController < ApplicationController
|
||||||
render :action => 'register'
|
render :action => 'register'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def invalid_credentials
|
||||||
|
flash.now[:error] = l(:notice_account_invalid_creditentials)
|
||||||
|
end
|
||||||
|
|
||||||
# Register a user for email activation.
|
# Register a user for email activation.
|
||||||
#
|
#
|
||||||
# Pass a block for behavior when a user fails to save
|
# Pass a block for behavior when a user fails to save
|
||||||
|
|
Loading…
Reference in New Issue