diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-12-05 13:07:49 +0000 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-12-05 13:07:49 +0000 |
commit | 44ada25dad2dff99708a9b98ffb9d82ee602950e (patch) | |
tree | e369aa1b963a744adb4418f422ddee9e8ee210f3 /perllib/FixMyStreet/App/Controller/Report/New.pm | |
parent | 51cbde5ebcc08c52d3d5531c529c0c7a52b5e230 (diff) | |
parent | 1c288ef2dfc1b2e57d6a51c11401e95e8c589bd4 (diff) |
Merge branch '642-new-report-flow-changes'
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report/New.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report/New.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm index 1a1a657a9..ce2fe19f6 100644 --- a/perllib/FixMyStreet/App/Controller/Report/New.pm +++ b/perllib/FixMyStreet/App/Controller/Report/New.pm @@ -6,6 +6,7 @@ BEGIN { extends 'Catalyst::Controller'; } use Encode; use List::MoreUtils qw(uniq); +use List::Util 'first'; use POSIX 'strcoll'; use HTML::Entities; use mySociety::MaPit; @@ -789,7 +790,10 @@ sub process_user : Private { # Extract all the params to a hash to make them easier to work with my %params = map { $_ => $c->get_param($_) } - ( 'username', 'email', 'name', 'phone', 'password_register', 'fms_extra_title' ); + ( 'email', 'name', 'phone', 'password_register', 'fms_extra_title' ); + + # Report form includes two username fields: #form_username_register and #form_username_sign_in + $params{username} = (first { $_ } $c->get_param_list('username')) || ''; if ( $c->cobrand->allow_anonymous_reports ) { my $anon_details = $c->cobrand->anonymous_account; |