X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcontact.pm;h=44c538806f1f1d0357de6da76fd2c96fe72f8758;hp=a873fda472d854e0d4b5ac185a1901af3923eb43;hb=ac6ee60516873a1c79d5d4c72269705b29dbdeca;hpb=8410cdd0df8c470b0d804be5e03539303f2a8079 diff --git a/FS/FS/contact.pm b/FS/FS/contact.pm index a873fda47..44c538806 100644 --- a/FS/FS/contact.pm +++ b/FS/FS/contact.pm @@ -10,6 +10,7 @@ use FS::Record qw( qsearch qsearchs dbh ); use FS::Cursor; use FS::contact_phone; use FS::contact_email; +use FS::contact::Import; use FS::queue; use FS::phone_type; #for cgi_contact_fields use FS::cust_contact; @@ -577,6 +578,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 +673,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'); } @@ -945,7 +955,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