X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=FS%2FFS%2FClientAPI%2FMyAccount.pm;h=9533d6a7350e67ce07af3fadec497affc1dd16f5;hb=33c725fc1419daeb11b818d12ac6cd7ec499c310;hp=a5f47934be56a3675d3b674dfcd55d961f291e02;hpb=06e9b0e6c9329e480e3b26bd38e1d3d23a88f6a3;p=freeside.git diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm index a5f47934b..9533d6a73 100644 --- a/FS/FS/ClientAPI/MyAccount.pm +++ b/FS/FS/ClientAPI/MyAccount.pm @@ -2148,6 +2148,11 @@ sub myaccount_passwd { } ) or return { 'error' => "Service not found" }; + if ( exists($p->{'old_password'}) ) { + return { 'error' => "Incorrect password." }; + unless $svc_acct->check_password($p->{'old_password'}); + } + $svc_acct->_password($p->{'new_password'}); my $error = $svc_acct->replace();