summaryrefslogtreecommitdiff
path: root/FS/FS/ClientAPI/MyAccount.pm
diff options
context:
space:
mode:
Diffstat (limited to 'FS/FS/ClientAPI/MyAccount.pm')
-rw-r--r--FS/FS/ClientAPI/MyAccount.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm
index 5b590da2b..47f3bd88e 100644
--- a/FS/FS/ClientAPI/MyAccount.pm
+++ b/FS/FS/ClientAPI/MyAccount.pm
@@ -2856,6 +2856,13 @@ sub myaccount_passwd {
my $error = '';
my $conf = new FS::Conf;
+
+ return { 'error' => 'Incorrect current password.' }
+ if ( exists($p->{'old_password'})
+ || $conf->exists('selfservice-password_change_oldpass')
+ )
+ && ! $svc_acct->check_password($p->{'old_password'});
+
$error = 'Password too short.'
if length($p->{'new_password'}) < ($conf->config('passwordmin') || 6);
$error = 'Password too long.'