diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb index 085ee0c60..c05d1172c 100644 --- a/app/controllers/account_controller.rb +++ b/app/controllers/account_controller.rb @@ -102,7 +102,14 @@ class AccountController < ApplicationController # User self-registration def register # @root_path="/home/pdl/redmine-2.3.2-0/apache2/" -# +# + @cache_identityy = params[:identity]||"" #身份 + @cache_no = params[:no]||"" #学号 + @cache_technical_title = params[:technical_title]||"" #教师职称 + @cache_province = params[:province]||"" #省份 + @cache_city = params[:city]||"" #城市 + @cache_enterprise_name = params[:enterprise_name]||"" #企业 + (redirect_to(home_url); return) unless Setting.self_registration? || session[:auth_source_registration] if request.get? session[:auth_source_registration] = nil @@ -112,8 +119,8 @@ class AccountController < ApplicationController @user = User.new @user.safe_attributes = user_params if params[:identity] == "2" # 2 企业 - @user.firstname = params[:enterprise_name] - @user.lastname = l(:field_enterprise) + #@user.firstname = params[:enterprise_name] + #@user.lastname = l(:field_enterprise) end @user.admin = false @user.register diff --git a/app/views/account/register.html.erb b/app/views/account/register.html.erb index 260d53744..21c8c11b9 100644 --- a/app/views/account/register.html.erb +++ b/app/views/account/register.html.erb @@ -193,7 +193,40 @@