diff options
Diffstat (limited to 'perllib/FixMyStreet/App/Controller')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report/New.pm | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm index efcaf8ddc..cbbf8971a 100644 --- a/perllib/FixMyStreet/App/Controller/Report/New.pm +++ b/perllib/FixMyStreet/App/Controller/Report/New.pm @@ -851,9 +851,11 @@ sub process_user : Private { my $user = $c->user->obj; if ($c->stash->{contributing_as_another_user}) { - # Act as if not logged in (and it will be auto-confirmed later on) - $report->user(undef); - last; + if ($params{username} || $params{phone}) { + # Act as if not logged in (and it will be auto-confirmed later on) + $report->user(undef); + last; + } } $report->user( $user ); @@ -867,6 +869,8 @@ sub process_user : Private { $report->name($name); $user->name($name) unless $user->name; $c->stash->{no_reporter_alert} = 1; + } elsif ($c->stash->{contributing_as_another_user}) { + $c->stash->{no_reporter_alert} = 1; } return 1; @@ -1608,6 +1612,7 @@ sub redirect_or_confirm_creation : Private { # Subscribe problem reporter to email updates $c->forward( 'create_reporter_alert' ); if ($c->stash->{contributing_as_another_user} && $report->user->email + && $report->user->id != $c->user->id && !$c->cobrand->report_sent_confirmation_email) { $c->send_email( 'other-reported.txt', { to => [ [ $report->user->email, $report->name ] ], |