X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=FS%2FFS%2FClientAPI%2FMyAccount.pm;h=9533d6a7350e67ce07af3fadec497affc1dd16f5;hb=33c725fc1419daeb11b818d12ac6cd7ec499c310;hp=9a1cc50f3f9b5519e160ccee5650f04c7cf8a5f9;hpb=dcf8dfc4c58fb3e518e09f4f988c4e17c9fd9591;p=freeside.git diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm index 9a1cc50f3..9533d6a73 100644 --- a/FS/FS/ClientAPI/MyAccount.pm +++ b/FS/FS/ClientAPI/MyAccount.pm @@ -433,6 +433,7 @@ sub customer_info { if ( $session->{'svcnum'} ) { my $cust_svc = qsearchs('cust_svc', { 'svcnum' => $session->{'svcnum'} }); $return{'svc_label'} = ($cust_svc->label)[1] if $cust_svc; + $return{'svcnum'} = $session->{'svcnum'}; } } elsif ( $session->{'svcnum'} ) { #no customer record @@ -500,6 +501,7 @@ sub customer_info_short { if ( $session->{'svcnum'} ) { my $cust_svc = qsearchs('cust_svc', { 'svcnum' => $session->{'svcnum'} }); $return{'svc_label'} = ($cust_svc->label)[1] if $cust_svc; + $return{'svcnum'} = $session->{'svcnum'}; } } elsif ( $session->{'svcnum'} ) { #no customer record @@ -2146,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();