aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-06-20 14:35:54 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-08-08 16:18:11 +0100
commited3f37c379694c545cb6976fa9f52cc65211804e (patch)
treebd04c60547c16ee8cc919aeb939c39cb7bc84143
parent82f4fd831c2dd4517437b1c27c2ec43ac6d14549 (diff)
Don't redirect if logged in & auth form submitted.
If you submit the auth form (as opposed to clicking a link to something that redirects to the auth form), we should assume you want to treat that as a login.
-rw-r--r--perllib/FixMyStreet/App/Controller/Auth.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Auth.pm b/perllib/FixMyStreet/App/Controller/Auth.pm
index 4efa7abb8..83fb0554c 100644
--- a/perllib/FixMyStreet/App/Controller/Auth.pm
+++ b/perllib/FixMyStreet/App/Controller/Auth.pm
@@ -33,7 +33,7 @@ sub general : Path : Args(0) {
my ( $self, $c ) = @_;
$c->detach( 'redirect_on_signin', [ $c->get_param('r') ] )
- if $c->user && $c->get_param('r');
+ if $c->req->method eq 'GET' && $c->user && $c->get_param('r');
# all done unless we have a form posted to us
return unless $c->req->method eq 'POST';