summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/contact.pm13
-rw-r--r--FS/FS/cust_contact.pm2
2 files changed, 12 insertions, 3 deletions
diff --git a/FS/FS/contact.pm b/FS/FS/contact.pm
index 9c83338..a429c2d 100644
--- a/FS/FS/contact.pm
+++ b/FS/FS/contact.pm
@@ -577,6 +577,15 @@ sub replace {
}
}
+ if ( $self->get('password') ) {
+ my $error = $self->is_password_allowed($self->get('password'))
+ || $self->change_password($self->get('password'));
+ if ( $error ) {
+ $dbh->rollback if $oldAutoCommit;
+ return $error;
+ }
+ }
+
$dbh->commit or die $dbh->errstr if $oldAutoCommit;
'';
@@ -663,7 +672,7 @@ and replace methods.
sub check {
my $self = shift;
- if ( $self->selfservice_access eq 'R' ) {
+ if ( $self->selfservice_access eq 'R' || $self->selfservice_access eq 'P' ) {
$self->selfservice_access('Y');
$self->_resend('Y');
}
@@ -951,7 +960,7 @@ sub cgi_contact_fields {
my @contact_fields = qw(
classnum first last title comment emailaddress selfservice_access
- invoice_dest
+ invoice_dest password
);
push @contact_fields, 'phonetypenum'. $_->phonetypenum
diff --git a/FS/FS/cust_contact.pm b/FS/FS/cust_contact.pm
index f0f8bfb..6820ac4 100644
--- a/FS/FS/cust_contact.pm
+++ b/FS/FS/cust_contact.pm
@@ -106,7 +106,7 @@ and replace methods.
sub check {
my $self = shift;
- if ( $self->selfservice_access eq 'R' ) {
+ if ( $self->selfservice_access eq 'R' || $self->selfservice_access eq 'P') {
$self->selfservice_access('Y');
$self->_resend('Y');
}