projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
RT#38314: Declined payment shows card as tokenized after first attempt [fixed if...
[freeside.git]
/
FS
/
FS
/
contact.pm
diff --git
a/FS/FS/contact.pm
b/FS/FS/contact.pm
index
7e474f1
..
96632ff
100644
(file)
--- a/
FS/FS/contact.pm
+++ b/
FS/FS/contact.pm
@@
-179,7
+179,7
@@
sub insert {
}
}
}
}
- if ( $self->selfservice_access ) {
+ if ( $self->selfservice_access
&& ! length($self->_password)
) {
my $error = $self->send_reset_email( queue=>1 );
if ( $error ) {
$dbh->rollback if $oldAutoCommit;
my $error = $self->send_reset_email( queue=>1 );
if ( $error ) {
$dbh->rollback if $oldAutoCommit;
@@
-283,8
+283,11
@@
sub replace {
);
my $contact_phone = qsearchs('contact_phone', \%cp);
);
my $contact_phone = qsearchs('contact_phone', \%cp);
- # if new value is empty, delete old entry
- if (!$self->get($pf)) {
+ my $pv = $self->get($pf);
+ $pv =~ s/\s//g;
+
+ #if new value is empty, delete old entry
+ if (!$pv) {
if ($contact_phone) {
$error = $contact_phone->delete;
if ( $error ) {
if ($contact_phone) {
$error = $contact_phone->delete;
if ( $error ) {
@@
-297,7
+300,7
@@
sub replace {
$contact_phone ||= new FS::contact_phone \%cp;
$contact_phone ||= new FS::contact_phone \%cp;
- my %cpd = _parse_phonestring( $
self->get($pf)
);
+ my %cpd = _parse_phonestring( $
pv
);
$contact_phone->set( $_ => $cpd{$_} ) foreach keys %cpd;
my $method = $contact_phone->contactphonenum ? 'replace' : 'insert';
$contact_phone->set( $_ => $cpd{$_} ) foreach keys %cpd;
my $method = $contact_phone->contactphonenum ? 'replace' : 'insert';