diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-02-06 16:41:11 +0000 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-02-07 12:11:54 +0000 |
commit | 3e721ddf5d9809c9f44d7dedcf2083a544e6e148 (patch) | |
tree | c5b899080b323ef66ef9876a61955a6cac001df8 /perllib/FixMyStreet/App/Controller/Auth.pm | |
parent | b4b6679f6aac821ac31e541e0cc6f05549b130b5 (diff) |
Allow two-factor to work during creation flow.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Auth.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Auth.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Auth.pm b/perllib/FixMyStreet/App/Controller/Auth.pm index 06448afde..b2d909f9c 100644 --- a/perllib/FixMyStreet/App/Controller/Auth.pm +++ b/perllib/FixMyStreet/App/Controller/Auth.pm @@ -273,6 +273,11 @@ Used after signing in to take the person back to where they were. sub redirect_on_signin : Private { my ( $self, $c, $redirect, $params ) = @_; + + if ($c->stash->{detach_to}) { + $c->detach($c->stash->{detach_to}, $c->stash->{detach_args}); + } + unless ( $redirect ) { $c->detach('redirect_to_categories') if $c->user->from_body && scalar @{ $c->user->categories }; $redirect = 'my'; |