summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2017-12-15 16:44:18 -0800
committerIvan Kohler <ivan@freeside.biz>2017-12-15 16:44:18 -0800
commitcecb79407cc0e1ee7342c1f77ea17af7ddb8d5f4 (patch)
treec744e3170e72cccec06f424fb1bd834ededdb03f
parenteeca2ef2e54dbfdc88c83333176ecebbcfe87a42 (diff)
fix changing employee password, RT#78939
-rw-r--r--FS/FS/Password_Mixin.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/FS/FS/Password_Mixin.pm b/FS/FS/Password_Mixin.pm
index 963fa542b..e2e164bf3 100644
--- a/FS/FS/Password_Mixin.pm
+++ b/FS/FS/Password_Mixin.pm
@@ -47,7 +47,9 @@ sub is_password_allowed {
my $self = shift;
my $password = shift;
- my $cust_main = $self->cust_main;
+ my $cust_main = $self->table eq 'access_user'
+ ? $self->user_cust_main
+ : $self->cust_main;
# workaround for non-inserted services
if ( !$cust_main and $self->get('pkgnum') ) {