Preserve field values if the signup form fails validation
[rails.git] / app / controllers / user_controller.rb
index 16b76196b712925f5d491e75d127aed93334be16..86689644c8032b5139aae2dcfa7b5ed1dabd75c8 100644 (file)
@@ -253,6 +253,10 @@ class UserController < ApplicationController
   def new
     @title = t 'user.new.title'
     @referer = params[:referer] || session[:referer]
+    @user = User.new(:email => params[:email],
+                     :email_confirmation => params[:email],
+                     :display_name => params[:nickname],
+                     :openid_url => params[:openid])
 
     if session[:user]
       # The user is logged in already, so don't show them the signup