X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/d48b25124eaf561428176c60b79cc90e0a8e8125..d5f02968f6f2dd153c74844e818a4d2b2ae24991:/app/controllers/user_controller.rb?ds=sidebyside diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 9413ec6ed..d250cf21c 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -349,9 +349,13 @@ class UserController < ApplicationController @user.email = @user.new_email @user.new_email = nil @user.email_valid = true - changed = gravatar_enable(@user) + gravatar_enabled = gravatar_enable(@user) if @user.save - flash[:notice] = (t "user.confirm_email.success") + (changed ? " " + gravatar_status_message(@user) : "") + flash[:notice] = if gravatar_enabled + t("user.confirm_email.success") + " " + gravatar_status_message(@user) + else + t("user.confirm_email.success") + end else flash[:errors] = @user.errors end