1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-21 17:58:35 +00:00

Do not send notification emails to inactive users (#19131) (#19139)

Backport #19131
Backport #19142

Emails should not be sent to inactive users except for Activate and ResetPassword
messages.

Fix #18950

Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
zeripath
2022-03-19 18:33:32 +00:00
committed by GitHub
parent f9ea4ab69a
commit 45c836badc
4 changed files with 17 additions and 5 deletions

View File

@@ -31,6 +31,10 @@ func SendRepoTransferNotifyMail(doer, newOwner *user_model.User, repo *repo_mode
langMap := make(map[string][]string)
for _, user := range users {
if !user.IsActive {
// don't send emails to inactive users
continue
}
langMap[user.Language] = append(langMap[user.Language], user.Email)
}