summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-11-23 23:23:39 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-11-23 23:23:39 +0000
commit866e9e2503713c67fd33b389d4e840c04ce1562d (patch)
tree057021f697efdecc15ad85385dda28ea17e066fd
parentc21ee95ade208c09562c1a3940bec7535839a17c (diff)
downloadredmine-866e9e2503713c67fd33b389d4e840c04ce1562d.tar.gz
redmine-866e9e2503713c67fd33b389d4e840c04ce1562d.zip
Fixed: error on account/register when validation fails.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@925 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/controllers/account_controller.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb
index 37a810bdf..a1cbf5ffd 100644
--- a/app/controllers/account_controller.rb
+++ b/app/controllers/account_controller.rb
@@ -115,10 +115,10 @@ class AccountController < ApplicationController
@user.login = params[:user][:login]
@user.status = User::STATUS_REGISTERED
@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, :customized => @user, :value => params["custom_fields"][x.id.to_s]) }
- @user.custom_values = @custom_values
- end
+ @custom_values = UserCustomField.find(:all).collect { |x| CustomValue.new(:custom_field => x,
+ :customized => @user,
+ :value => (params["custom_fields"] ? params["custom_fields"][x.id.to_s] : nil)) }
+ @user.custom_values = @custom_values
case Setting.self_registration
when '1'
# Email activation