]>
iEval git - gruntmaster-page.git/blob - lib/Gruntmaster/Page/Passwd.pm
1 package Gruntmaster
::Page
::Passwd
;
6 use Gruntmaster
::Page
::Base
;
7 our @ISA = qw
/Gruntmaster::Page::Base/;
8 our $VERSION = '0.001';
10 use Apache2
::Authen
::Passphrase qw
/pwcheck pwset/;
14 my ($self, $format, $env) = @_;
15 my $r = Plack
::Request
->new($env);
16 my ($oldpass, $newpass, $confirm) = map {scalar $r->param($_)} 'password', 'new_password', 'confirm_new_password';
18 return reply
'Incorrect password' unless eval { pwcheck
$r->user, $oldpass; 1 };
19 return reply
'The two passwords do not match' unless $newpass eq $confirm;
21 pwset
$r->user, $newpass;
22 reply
'Password changed successfully';
25 sub variants
{ [[reply
=> 1, undef, undef, undef, undef, undef]] }
This page took 0.046849 seconds and 4 git commands to generate.