diff --git a/app/controllers/public/account_controller.rb b/app/controllers/public/account_controller.rb index 7b0fb1d..ee773b8 100644 --- a/app/controllers/public/account_controller.rb +++ b/app/controllers/public/account_controller.rb @@ -87,7 +87,6 @@ class AccountController < ApplicationController @person.environment = @user.environment unless @user.environment.enabled?('admin_must_approve_new_users') if request.post? - @person.attributes = params[:profile_data] if may_be_a_bot set_signup_start_time_for_now @block_bot = true @@ -107,6 +106,7 @@ class AccountController < ApplicationController end if @user.activated? self.current_user = @user + check_join_in_community(@user) go_to_signup_initial_page else @register_pending = true @@ -117,11 +117,13 @@ class AccountController < ApplicationController @task = CreateUser.new(params[:user]) @task.person_data = @user.person_data if request.post? - @task.target = @user.environment - @task.name = @user.name - if @task.save - session[:notice] = _('Thanks for registering. The administrators were notified.') - @register_pending = true + if @user.valid? + @task.target = @user.environment + @task.name = @user.name + if @task.save + session[:notice] = _('Thanks for registering. The administrators were notified.') + @register_pending = true + end end end end diff --git a/app/models/create_user.rb b/app/models/create_user.rb index c487d4d..615d0ab 100644 --- a/app/models/create_user.rb +++ b/app/models/create_user.rb @@ -28,6 +28,7 @@ class CreateUser < Task def perform user = User.new(user_data) user.person = Person.new(person_data) + user.person.identifier = user.login author_name = user.name user.environment = self.environment user.person.environment = user.environment diff --git a/app/views/account/signup.html.erb b/app/views/account/signup.html.erb index 07ffd31..ad67521 100644 --- a/app/views/account/signup.html.erb +++ b/app/views/account/signup.html.erb @@ -2,18 +2,32 @@
<%= _("Firstly, some tips for getting started:") %>
+<%= _("You should receive a welcome email from us shortly. Please take a second to follow the link within to confirm your account.") %>
+<%= _("You won't appear as %s until your account is confirmed.") % link_to(_('user'), {:controller => :search, :action => :people, :filter => 'more_recent'}, :target => '_blank') %>
+<%= _("%s. Upload an avatar and let your friends find you easily :)") % link_to(_('Customize your profile'), {:controller => 'doc', :section => 'user', :topic => 'editing-person-info'}, :target => '_blank') %>
+<%= _("Learn the guidelines. Read the %s for more details on how to use this social network!") % link_to(_('Documentation'), {:controller => 'doc'}, :target => '_blank') %>
+<%= _("%s your Gmail, Yahoo and Hotmail contacts!") % link_to(_('Invite and find'), {:controller => 'doc', :section => 'user', :topic => 'invite-contacts'}, :target => '_blank') %>
+<%= _("Start exploring and have fun!") %>
+<%= _("Firstly, some tips for getting started:") %>
-<%= _("You should receive a welcome email from us shortly. Please take a second to follow the link within to confirm your account.") %>
-<%= _("You won't appear as %s until your account is confirmed.") % link_to(_('user'), {:controller => :search, :action => :people, :filter => 'more_recent'}, :target => '_blank') %>
-<%= _("%s. Upload an avatar and let your friends find you easily :)") % link_to(_('Customize your profile'), {:controller => 'doc', :section => 'user', :topic => 'editing-person-info'}, :target => '_blank') %>
-<%= _("Learn the guidelines. Read the %s for more details on how to use this social network!") % link_to(_('Documentation'), {:controller => 'doc'}, :target => '_blank') %>
-<%= _("%s your Gmail, Yahoo and Hotmail contacts!") % link_to(_('Invite and find'), {:controller => 'doc', :section => 'user', :topic => 'invite-contacts'}, :target => '_blank') %>
-<%= _("Start exploring and have fun!") %>
+<%= _("Firstly, some tips for getting started:") %>
+<%= _("You should receive a welcome email from us shortly. Please take a second to follow the link within to confirm your account.") %>
+<%= _("You won't appear as %s until your account is confirmed.") % link_to(_('user'), {:controller => :search, :action => :people, :filter => 'more_recent'}, :target => '_blank') %>
+<%= _("%s. Upload an avatar and let your friends find you easily :)") % link_to(_('Customize your profile'), {:controller => 'doc', :section => 'user', :topic => 'editing-person-info'}, :target => '_blank') %>
+<%= _("Learn the guidelines. Read the %s for more details on how to use this social network!") % link_to(_('Documentation'), {:controller => 'doc'}, :target => '_blank') %>
+<%= _("%s your Gmail, Yahoo and Hotmail contacts!") % link_to(_('Invite and find'), {:controller => 'doc', :section => 'user', :topic => 'invite-contacts'}, :target => '_blank') %>
+<%= _("Start exploring and have fun!") %>
<% end %>