aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Script/Questionnaires.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-09-27 14:46:46 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-09-30 15:04:06 +0100
commitc7d98f98bf4faa1a60552dd11195eb134445b6b3 (patch)
tree47028cce45ce2ac77c5208f18bdb02b45d7220c2 /perllib/FixMyStreet/Script/Questionnaires.pm
parentd0ae2a420905dbd0b79141d88e2c47956d1d65b2 (diff)
Adapt things that assume email will be present.
This includes stopping some emails being sent (moderation, alert, questionnaire), dealing with Open311/email report sending, and tokenised_url.
Diffstat (limited to 'perllib/FixMyStreet/Script/Questionnaires.pm')
-rw-r--r--perllib/FixMyStreet/Script/Questionnaires.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Script/Questionnaires.pm b/perllib/FixMyStreet/Script/Questionnaires.pm
index ec6139d2d..5fc01512d 100644
--- a/perllib/FixMyStreet/Script/Questionnaires.pm
+++ b/perllib/FixMyStreet/Script/Questionnaires.pm
@@ -49,7 +49,11 @@ sub send_questionnaires_period {
# Not all cobrands send questionnaires
next unless $cobrand->send_questionnaires;
- next if $row->is_from_abuser;
+
+ if ($row->is_from_abuser || !$row->user->email_verified) {
+ $row->update( { send_questionnaire => 0 } );
+ next;
+ }
# Cobranded and non-cobranded messages can share a database. In this case, the conf file
# should specify a vhost to send the reports for each cobrand, so that they don't get sent