X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/c105164d7e652dec72a4bff0a47ef96540a6f5ba..7e0fb05dd2128ea7e93ac214bca813388ceaa012:/app/controllers/confirmations_controller.rb diff --git a/app/controllers/confirmations_controller.rb b/app/controllers/confirmations_controller.rb index b77ed09b3..06e7c8e7d 100644 --- a/app/controllers/confirmations_controller.rb +++ b/app/controllers/confirmations_controller.rb @@ -25,7 +25,7 @@ class ConfirmationsController < ApplicationController render_unknown_user token.user.display_name else user = token.user - user.status = "active" + user.activate user.email_valid = true flash[:notice] = gravatar_status_message(user) if gravatar_enable(user) user.save! @@ -66,7 +66,7 @@ class ConfirmationsController < ApplicationController flash[:error] = t "confirmations.confirm_resend.failure", :name => params[:display_name] else UserMailer.signup_confirm(user, user.tokens.create).deliver_later - flash[:notice] = t "confirmations.confirm_resend.success_html", :email => user.email, :sender => Settings.support_email + flash[:notice] = { :partial => "confirmations/resend_success_flash", :locals => { :email => user.email, :sender => Settings.email_from } } end redirect_to login_path @@ -93,13 +93,13 @@ class ConfirmationsController < ApplicationController current_user.tokens.delete_all session[:user] = current_user.id session[:fingerprint] = current_user.fingerprint - redirect_to :controller => :users, :action => :account, :display_name => current_user.display_name elsif token flash[:error] = t "confirmations.confirm_email.failure" - redirect_to :controller => :users, :action => :account, :display_name => token.user.display_name else flash[:error] = t "confirmations.confirm_email.unknown_token" end + + redirect_to edit_account_path end end @@ -129,9 +129,9 @@ class ConfirmationsController < ApplicationController # display a message about th current status of the gravatar setting def gravatar_status_message(user) if user.image_use_gravatar - t "users.account.gravatar.enabled" + t "profiles.edit.gravatar.enabled" else - t "users.account.gravatar.disabled" + t "profiles.edit.gravatar.disabled" end end end