diff options
author | Matthew Somerville <matthew@mysociety.org> | 2011-08-09 14:12:07 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-08-09 14:12:07 +0100 |
commit | 3d146713442dd9544ad89c35fdc8dcb1e8698ad6 (patch) | |
tree | 75b178ff7043c995fe3f4e97f93b2c1606ac148a | |
parent | c18bc0f6570b524160d7a617585304a31961e0e2 (diff) |
Lowercase email addresses sent via /import. Fixes #146.
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report/New.pm | 2 | ||||
-rw-r--r-- | t/app/controller/report_import.t | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm index 346dfb377..75bdff4a6 100644 --- a/perllib/FixMyStreet/App/Controller/Report/New.pm +++ b/perllib/FixMyStreet/App/Controller/Report/New.pm @@ -198,7 +198,7 @@ sub report_import : Path('/import') { # find or create the user my $report_user = $c->model('DB::User')->find_or_create( { - email => $input{email}, + email => lc $input{email}, name => $input{name}, phone => $input{phone} } diff --git a/t/app/controller/report_import.t b/t/app/controller/report_import.t index 61ee28b88..385445565 100644 --- a/t/app/controller/report_import.t +++ b/t/app/controller/report_import.t @@ -77,7 +77,7 @@ subtest "Submit a correct entry" => sub { with_fields => { service => 'test-script', name => 'Test User', - email => 'test@example.com', + email => 'Test@example.com', subject => 'Test report', detail => 'This is a test report', photo => $sample_file, |