diff options
author | Struan Donald <struan@exo.org.uk> | 2011-09-05 16:47:02 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2011-09-05 16:47:02 +0100 |
commit | 48507f44f28e9969089612e0e9bf530e2f7fb57e (patch) | |
tree | a5fea48c90cabd030e138efdaa7f48b84da4d2f4 /perllib/FixMyStreet/App/Controller/Report/New.pm | |
parent | b657cbbbb2a04239914cf3704cb222a8b8635a74 (diff) |
do not display spurious name error message when sign in during report submission fails
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report/New.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report/New.pm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm index ffbb5a161..c70a74146 100644 --- a/perllib/FixMyStreet/App/Controller/Report/New.pm +++ b/perllib/FixMyStreet/App/Controller/Report/New.pm @@ -846,6 +846,13 @@ sub check_for_errors : Private { %{ $c->stash->{report}->check_for_errors }, ); + # if they're got the login details wrong when signing in then + # we don't care about the name field even though it's validated + # by the user object + if ( $c->req->param('submit_sign_in') and $field_errors{password} ) { + delete $field_errors{name}; + } + # add the photo error if there is one. if ( my $photo_error = delete $c->stash->{photo_error} ) { $field_errors{photo} = $photo_error; |