diff options
author | zeripath <art27@cantab.net> | 2022-03-19 12:45:44 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-19 20:45:44 +0800 |
commit | fb08d2b3fd04dc8fc6cbd45fd341773b817c0857 (patch) | |
tree | 5f8c5da22ab64e5421fe5ca5075ab8fe8eca9355 /routers/private | |
parent | 60fbaa90683add2a8af891fc2ca8448b9b75c92e (diff) | |
download | gitea-fb08d2b3fd04dc8fc6cbd45fd341773b817c0857.tar.gz gitea-fb08d2b3fd04dc8fc6cbd45fd341773b817c0857.zip |
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>
Diffstat (limited to 'routers/private')
-rw-r--r-- | routers/private/mail.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/private/mail.go b/routers/private/mail.go index 8b69c38093..853b58b09d 100644 --- a/routers/private/mail.go +++ b/routers/private/mail.go @@ -60,7 +60,7 @@ func SendEmail(ctx *context.PrivateContext) { } } else { err := user_model.IterateUser(func(user *user_model.User) error { - if len(user.Email) > 0 { + if len(user.Email) > 0 && user.IsActive { emails = append(emails, user.Email) } return nil |