diff options
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | perllib/FixMyStreet/Script/Inactive.pm | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index cf3bfae5d..2413892c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - Do not remove any devolved contacts. - Fix double encoding of per-category templates. - Return reports in all closed states through Open311. + - Skip accounts without email when sending inactive emails. - Admin improvements: - Display user name/email for contributed as reports. #2990 - Interface for enabling anonymous reports for certain categories. #2989 diff --git a/perllib/FixMyStreet/Script/Inactive.pm b/perllib/FixMyStreet/Script/Inactive.pm index 4d28057d4..6b3372a2b 100644 --- a/perllib/FixMyStreet/Script/Inactive.pm +++ b/perllib/FixMyStreet/Script/Inactive.pm @@ -185,6 +185,7 @@ sub email_inactive_users { }); while (my $user = $users->next) { next if $user->get_extra_metadata('inactive_email_sent'); + next unless $user->email && $user->email_verified; say "Emailing user #" . $user->id if $self->verbose; next if $self->dry_run; |