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:
Jean-Philippe Lang 2007-11-23 23:23:39 +00:00
parent c21ee95ade
commit 866e9e2503
1 changed files with 4 additions and 4 deletions

View File

@ -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,
@user.custom_values = @custom_values :value => (params["custom_fields"] ? params["custom_fields"][x.id.to_s] : nil)) }
end @user.custom_values = @custom_values
case Setting.self_registration case Setting.self_registration
when '1' when '1'
# Email activation # Email activation