X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=FS%2FFS%2Fcontact.pm;h=4db3cdfd1f49aff287147569d9c7eb5b8ff2a815;hb=63681a4b7352cab8402cb732dc691d35c01d21e2;hp=ad0de6e3228366369aa80efad1b61e38f8ce445d;hpb=75ab0df930bcbf5173cdda2ce7704fdcf09d9d39;p=freeside.git diff --git a/FS/FS/contact.pm b/FS/FS/contact.pm index ad0de6e32..4db3cdfd1 100644 --- a/FS/FS/contact.pm +++ b/FS/FS/contact.pm @@ -12,6 +12,7 @@ use FS::contact_class; use FS::cust_location; use FS::contact_phone; use FS::contact_email; +use FS::contact::Import; use FS::queue; use FS::cust_pkg; use FS::phone_type; #for cgi_contact_fields @@ -370,6 +371,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; ''; @@ -456,7 +466,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 'E' || $self->selfservice_access eq 'P' ) { $self->selfservice_access('Y'); $self->_resend('Y'); } @@ -742,6 +752,7 @@ sub cgi_contact_fields { my @contact_fields = qw( classnum first last title comment emailaddress selfservice_access + invoice_dest password ); push @contact_fields, 'phonetypenum'. $_->phonetypenum