aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Auth.pm
diff options
context:
space:
mode:
authorEdmund von der Burg <evdb@mysociety.org>2011-03-24 12:40:49 +0000
committerEdmund von der Burg <evdb@mysociety.org>2011-03-24 12:40:49 +0000
commitd839ff45d1bbbb65d2e1faac1a6a62a955aabb54 (patch)
tree0b2696892f95ec9da74a689a1b306636bbee8a96 /perllib/FixMyStreet/App/Controller/Auth.pm
parent237fff72cf2b574ae8d19e9e2596ea93e08fcfc6 (diff)
auth related fixes
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Auth.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Auth.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Auth.pm b/perllib/FixMyStreet/App/Controller/Auth.pm
index 3d60172cf..16f0b994c 100644
--- a/perllib/FixMyStreet/App/Controller/Auth.pm
+++ b/perllib/FixMyStreet/App/Controller/Auth.pm
@@ -155,7 +155,12 @@ Let the user change their password.
sub change_password : Local {
my ( $self, $c ) = @_;
- # FIXME - should be logged in
+ # FIXME - handle not being logged in more elegantly
+ unless ( $c->user ) {
+ $c->res->redirect( $c->uri_for('/auth') );
+ $c->detach;
+ }
+
# FIXME - CSRF check here
# FIXME - minimum criteria for passwords (length, contain number, etc)