aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Report/New.pm
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2012-12-04 14:25:48 +0000
committerStruan Donald <struan@exo.org.uk>2012-12-04 14:25:48 +0000
commit8e7b15a165ae0bc5a0afc42dd35635c53adf488e (patch)
tree18a8023c87ed8bf2e9768df89fcc6ac37be563d5 /perllib/FixMyStreet/App/Controller/Report/New.pm
parentd15979ba78fe0c777c93b30b2dba7df72fee0abf (diff)
allow cobrand to skip report confirmation
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report/New.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm5
1 files changed, 4 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} = {