do not send emails to disabled user

This commit is contained in:
Son 2021-11-20 19:42:49 +01:00
parent 30f2734853
commit a072fdcd96
1 changed files with 1 additions and 1 deletions

View File

@ -830,7 +830,7 @@ class User(Base, ModelMixin, UserMixin, PasswordOracle):
- the unsubscribe URL
- whether the unsubscribe method is via sending email (mailto:) or Http POST
"""
if self.notification and self.activated:
if self.notification and self.activated and not self.disabled:
if self.newsletter_alias_id:
alias = Alias.get(self.newsletter_alias_id)
if alias.enabled: