Mercurial > hg > soundsoftware-site
comparison app/controllers/account_controller.rb @ 60:cf39b52d24b4 luisf
DEVELOPMENT COMMIT: The description can now be seen and edited BUT when a new user registers the informations is not saved to the correct table.
author | luisf |
---|---|
date | Wed, 01 Dec 2010 18:04:19 +0000 |
parents | 7ff14a13f48a |
children | 39db1b84d09f |
comparison
equal
deleted
inserted
replaced
59:7ff14a13f48a | 60:cf39b52d24b4 |
---|---|
75 end | 75 end |
76 | 76 |
77 # User self-registration | 77 # User self-registration |
78 def register | 78 def register |
79 redirect_to(home_url) && return unless Setting.self_registration? || session[:auth_source_registration] | 79 redirect_to(home_url) && return unless Setting.self_registration? || session[:auth_source_registration] |
80 | |
80 if request.get? | 81 if request.get? |
81 session[:auth_source_registration] = nil | 82 session[:auth_source_registration] = nil |
82 @user = User.new(:language => Setting.default_language) | 83 @user = User.new(:language => Setting.default_language) |
84 | |
83 else | 85 else |
84 @user = User.new(params[:user]) | 86 @user = User.new(params[:user]) |
85 @user.admin = false | 87 @user.admin = false |
88 | |
89 @user.register | |
86 | 90 |
87 | |
88 @user.description = params[:description] | |
89 | |
90 | |
91 @user.register | |
92 if session[:auth_source_registration] | 91 if session[:auth_source_registration] |
93 @user.activate | 92 @user.activate |
94 @user.login = session[:auth_source_registration][:login] | 93 @user.login = session[:auth_source_registration][:login] |
95 @user.auth_source_id = session[:auth_source_registration][:auth_source_id] | 94 @user.auth_source_id = session[:auth_source_registration][:auth_source_id] |
96 if @user.save | 95 if @user.save |