diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-17 19:05:49 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-17 19:05:49 +0300 |
commit | 43a25d93ebdabea52f99b05e15b06250cd8f07d7 (patch) | |
tree | dceebdc68925362117480a5d672bcff122fb625b /app/mailers/emails/profile.rb | |
parent | 20c84b99005abd1c82101dfeff264ac50d2df211 (diff) |
Add latest changes from gitlab-org/gitlab@16-0-stable-eev16.0.0-rc42
Diffstat (limited to 'app/mailers/emails/profile.rb')
-rw-r--r-- | app/mailers/emails/profile.rb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/app/mailers/emails/profile.rb b/app/mailers/emails/profile.rb index 5b1750400d8..54a4c4be6a8 100644 --- a/app/mailers/emails/profile.rb +++ b/app/mailers/emails/profile.rb @@ -153,7 +153,7 @@ module Emails Gitlab::I18n.with_locale(@user.preferred_language) do email_with_layout( to: @user.notification_email_or_default, - subject: subject(_("Attempted sign in to %{host} using a wrong two-factor authentication code") % { host: Gitlab.config.gitlab.host })) + subject: subject(_("Attempted sign in to %{host} using an incorrect verification code") % { host: Gitlab.config.gitlab.host })) end end @@ -177,6 +177,19 @@ module Emails mail_with_locale(to: @user.notification_email_or_default, subject: subject(_("New email address added"))) end end + + def new_achievement_email(user, achievement) + return unless user&.active? + + @user = user + @achievement = achievement + + Gitlab::I18n.with_locale(@user.preferred_language) do + email_with_layout( + to: @user.notification_email_or_default, + subject: subject(s_("Achievements|%{namespace_full_path} awarded you the %{achievement_name} achievement") % { namespace_full_path: @achievement.namespace.full_path, achievement_name: @achievement.name })) + end + end end end |