From: Michael Andreen Date: Tue, 22 Sep 2009 11:02:28 +0000 (+0200) Subject: Show an error if password wasn't changed X-Git-Url: https://ruin.nu/git/?p=ndwebbie.git;a=commitdiff_plain;h=23470c3481cbd9e7dfa3bfa5cf05bbb41d098cc6 Show an error if password wasn't changed --- diff --git a/lib/NDWeb/Controller/Settings.pm b/lib/NDWeb/Controller/Settings.pm index 3f09a43..5780c2b 100644 --- a/lib/NDWeb/Controller/Settings.pm +++ b/lib/NDWeb/Controller/Settings.pm @@ -117,6 +117,8 @@ sub changePassword : Local { }); $query->execute($c->req->param('pass'),$c->req->param('oldpass'),$c->user->id); + $c->flash(error => "Old password was invalid") unless $query->rows; + $c->res->redirect($c->uri_for('')); }