Fixed: error on account/register when validation fails.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@925 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
c21ee95ade
commit
866e9e2503
|
@ -115,10 +115,10 @@ class AccountController < ApplicationController
|
||||||
@user.login = params[:user][:login]
|
@user.login = params[:user][:login]
|
||||||
@user.status = User::STATUS_REGISTERED
|
@user.status = User::STATUS_REGISTERED
|
||||||
@user.password, @user.password_confirmation = params[:password], params[:password_confirmation]
|
@user.password, @user.password_confirmation = params[:password], params[:password_confirmation]
|
||||||
if params["custom_fields"]
|
@custom_values = UserCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x,
|
||||||
@custom_values = UserCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x, :customized => @user, :value => params["custom_fields"][x.id.to_s]) }
|
:customized => @user,
|
||||||
|
:value => (params["custom_fields"] ? params["custom_fields"][x.id.to_s] : nil)) }
|
||||||
@user.custom_values = @custom_values
|
@user.custom_values = @custom_values
|
||||||
end
|
|
||||||
case Setting.self_registration
|
case Setting.self_registration
|
||||||
when '1'
|
when '1'
|
||||||
# Email activation
|
# Email activation
|
||||||
|
|
Loading…
Reference in New Issue