aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App/Controller')
-rw-r--r--perllib/FixMyStreet/App/Controller/Admin/Bodies.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin/Bodies.pm b/perllib/FixMyStreet/App/Controller/Admin/Bodies.pm
index f88ad0051..670336c14 100644
--- a/perllib/FixMyStreet/App/Controller/Admin/Bodies.pm
+++ b/perllib/FixMyStreet/App/Controller/Admin/Bodies.pm
@@ -252,8 +252,12 @@ sub update_contact : Private {
}
my $email = $c->get_param('email');
- $email =~ s/\s+//g;
my $send_method = $c->get_param('send_method') || $contact->body->send_method || "";
+ if ($send_method eq 'Open311') {
+ $email =~ s/^\s+|\s+$//g;
+ } else {
+ $email =~ s/\s+//g;
+ }
my $email_unchanged = $contact->email && $email && $contact->email eq $email;
my $cobrand = $contact->body->get_cobrand_handler;
my $cobrand_valid = $cobrand && $cobrand->call_hook(validate_contact_email => $email);