diff options
author | Struan Donald <struan@exo.org.uk> | 2012-12-04 14:25:48 +0000 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2012-12-04 14:25:48 +0000 |
commit | 8e7b15a165ae0bc5a0afc42dd35635c53adf488e (patch) | |
tree | 18a8023c87ed8bf2e9768df89fcc6ac37be563d5 /perllib/FixMyStreet/App/Controller/Report/New.pm | |
parent | d15979ba78fe0c777c93b30b2dba7df72fee0abf (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.pm | 5 |
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} = { |