diff options
author | Matthew Somerville <matthew@mysociety.org> | 2020-06-12 19:58:26 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2020-06-12 19:58:26 +0100 |
commit | 56d6d1524b4559ca407bcaf33f47a12960e83576 (patch) | |
tree | 311a7cec6e87754c48f41f1357bc610b0bf14151 | |
parent | 7ad5744b93c680e9dc641f4286c20dc5df5e2685 (diff) | |
parent | 251acf7799e78fd46a39154f0381c7470d5542a9 (diff) |
Merge branch 'skip-accounts-without-email'
-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; |