From c7d98f98bf4faa1a60552dd11195eb134445b6b3 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Wed, 27 Sep 2017 14:46:46 +0100 Subject: 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. --- perllib/FixMyStreet/Script/Questionnaires.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'perllib/FixMyStreet/Script/Questionnaires.pm') 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 -- cgit v1.2.3