mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-19 16:30:15 +00:00
Do not send notification emails to inactive users (#19131)
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:
parent
60fbaa9068
commit
fb08d2b3fd
3 changed files with 13 additions and 5 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue