]> ruin.nu Git - ndwebbie.git/commitdiff
Show an error if password wasn't changed
authorMichael Andreen <harv@ruin.nu>
Tue, 22 Sep 2009 11:02:28 +0000 (13:02 +0200)
committerMichael Andreen <harv@ruin.nu>
Tue, 22 Sep 2009 11:02:28 +0000 (13:02 +0200)
lib/NDWeb/Controller/Settings.pm

index 3f09a435f8e57979dfa99e37b466432c901900bb..5780c2b92921411655ba2e7b136fdcdcaa780d4b 100644 (file)
@@ -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(''));
 }