]>
iEval git - plack-app-gruntmaster.git/blob - lib/Gruntmaster/Page/Passwd.pm
1 package Gruntmaster
::Page
::Passwd
;
3 use Gruntmaster
::Page
::Base
;
4 use Apache2
::Authen
::Passphrase qw
/pwcheck pwset/;
7 my ($self, $format, $env) = @_;
8 my $r = Plack
::Request
->new($env);
9 my ($oldpass, $newpass, $confirm) = map {scalar $r->param($_)} 'password', 'new_password', 'confirm_new_password';
11 return reply
'Incorrect password' unless eval { pwcheck
$r->user, $oldpass; 1 };
12 return reply
'The two passwords do not match' unless $newpass eq $confirm;
14 pwset
$r->user, $newpass;
15 reply
'Password changed successfully';
This page took 0.042236 seconds and 4 git commands to generate.