forked from kevadesu/forgejo
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
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue