diff options
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report/New.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm index 5138e3a19..1e5825460 100644 --- a/perllib/FixMyStreet/App/Controller/Report/New.pm +++ b/perllib/FixMyStreet/App/Controller/Report/New.pm @@ -654,6 +654,7 @@ sub process_user : Private { $report->user( $user ); $report->name( $user->name ); $c->stash->{field_errors}->{name} = _('You have successfully signed in; please check and confirm your details are accurate:'); + $c->log->info($user->id . ' logged in during problem creation'); return 1; } @@ -958,10 +959,12 @@ sub save_user_and_report : Private { $report->user->phone( undef ); $report->user->password( '', 1 ); $report->user->insert(); + $c->log->info($report->user->id . ' created for this report'); } elsif ( $c->user && $report->user->id == $c->user->id ) { $report->user->update(); $report->confirm; + $c->log->info($report->user->id . ' is logged in for this report'); } else { # User exists and we are not logged in as them. @@ -972,6 +975,7 @@ sub save_user_and_report : Private { password => $report->user->password, }; $report->user->discard_changes(); + $c->log->info($report->user->id . ' exists, but is not logged in for this report'); } # If there was a photo add that too @@ -1051,6 +1055,7 @@ sub redirect_or_confirm_creation : Private { # Subscribe problem reporter to email updates $c->forward( 'create_reporter_alert' ); my $report_uri = $c->uri_for( '/report', $report->id ); + $c->log->info($report->user->id . ' was logged in, redirecting to /report/' . $report->id); $c->res->redirect($report_uri); $c->detach; } @@ -1072,6 +1077,7 @@ sub redirect_or_confirm_creation : Private { # tell user that they've been sent an email $c->stash->{template} = 'email_sent.html'; $c->stash->{email_type} = 'problem'; + $c->log->info($report->user->id . ' created ' . $report->id . ', email sent, ' . ($data->{password} ? 'password set' : 'password not set')); } sub create_reporter_alert : Private { |