aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/My.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/My.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/My.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/My.pm b/perllib/FixMyStreet/App/Controller/My.pm
index 4c509ec80..1189fe901 100644
--- a/perllib/FixMyStreet/App/Controller/My.pm
+++ b/perllib/FixMyStreet/App/Controller/My.pm
@@ -20,10 +20,15 @@ Catalyst Controller.
=cut
-# FIXME - only logged in users should get to here.
-
sub my : Path : Args(0) {
my ( $self, $c ) = @_;
+
+ # FIXME - handle not being logged in more elegantly
+ unless ( $c->user ) {
+ $c->res->redirect( $c->uri_for('/auth') );
+ $c->detach;
+ }
+
}
__PACKAGE__->meta->make_immutable;