X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e1065adc610f3094a22d43dddad5ffa04338ec38..446837c3511bf76f11b0d1e6d5a3ff79b69b0d70:/app/controllers/confirmations_controller.rb diff --git a/app/controllers/confirmations_controller.rb b/app/controllers/confirmations_controller.rb index 2a00a49b0..e54fa4a5d 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! @@ -93,10 +93,10 @@ class ConfirmationsController < ApplicationController current_user.tokens.delete_all session[:user] = current_user.id session[:fingerprint] = current_user.fingerprint - redirect_to user_account_path(current_user) + redirect_to edit_account_path elsif token flash[:error] = t "confirmations.confirm_email.failure" - redirect_to user_account_path(token.user) + redirect_to edit_account_path else flash[:error] = t "confirmations.confirm_email.unknown_token" end