]> iEval git - gruntmaster-page.git/blobdiff - lib/Gruntmaster/Page/Passwd.pm
Prepare for Dancer2 port
[gruntmaster-page.git] / lib / Gruntmaster / Page / Passwd.pm
diff --git a/lib/Gruntmaster/Page/Passwd.pm b/lib/Gruntmaster/Page/Passwd.pm
deleted file mode 100644 (file)
index 3a7522e..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-package Gruntmaster::Page::Passwd;
-
-use Gruntmaster::Page::Base;
-use Apache2::Authen::Passphrase qw/pwcheck pwset/;
-
-sub generate{
-       my ($self, $format, $env) = @_;
-       my $r = Plack::Request->new($env);
-       my ($oldpass, $newpass, $confirm) = map {scalar $r->param($_)} 'password', 'new_password', 'confirm_new_password';
-
-       return reply 'Incorrect password' unless eval { pwcheck $r->user, $oldpass; 1 };
-       return reply 'The two passwords do not match' unless $newpass eq $confirm;
-
-       pwset $r->user, $newpass;
-       reply 'Password changed successfully';
-}
-
-1
This page took 0.019171 seconds and 4 git commands to generate.