}
- $error ||= $self->insert_password_history;
-
if ( $error ) {
$dbh->rollback if $oldAutoCommit;
return $error;
}
}
+ 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;
'';
my $prospectnum = $self->prospectnum;
$self->prospectnum('');
my $custnum = $self->custnum;
- $self->custnum('');
+ $self->custnum(''); $old->custnum(''); # remove because now stored cust_contact
my %link_hash = ();
for (qw( classnum comment selfservice_access invoice_dest message_dest )) {
$link_hash{$_} = $self->get($_);
+ $old->$_(''); ##remove values from old record, causes problem with history
$self->$_('');
}
$hash eq $check_hash;
- } else {
+ } else {
return 0 if $self->_password eq '';