diff options
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report/New.pm | 5 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Default.pm | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm index 4b016ea5d..7d9e43d82 100644 --- a/perllib/FixMyStreet/App/Controller/Report/New.pm +++ b/perllib/FixMyStreet/App/Controller/Report/New.pm @@ -963,7 +963,10 @@ sub save_user_and_report : Private { my $report = $c->stash->{report}; # Save or update the user if appropriate - if ( !$report->user->in_storage ) { + if ( $c->cobrand->never_confirm_reports ) { + $report->user->update(); + $report->confirm(); + } elsif ( !$report->user->in_storage ) { # User does not exist. # Store changes in token for when token is validated. $c->stash->{token_data} = { diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm index 8f4f589f4..670e49469 100644 --- a/perllib/FixMyStreet/Cobrand/Default.pm +++ b/perllib/FixMyStreet/Cobrand/Default.pm @@ -758,5 +758,13 @@ sub report_check_for_errors { sub report_sent_confirmation_email { 0; } +=head2 never_confirm_reports + +If true then we never send an email to confirm a report + +=cut + +sub never_confirm_reports { 0; } + 1; |