Lines 73-79
if ( $query->param('sendEmail') || $query->param('resendEmail') ) {
Link Here
|
73 |
$errMultipleAccountsForEmail = 1; |
73 |
$errMultipleAccountsForEmail = 1; |
74 |
} |
74 |
} |
75 |
elsif ( $borrower = $search_results->next() ) { # One matching borrower |
75 |
elsif ( $borrower = $search_results->next() ) { # One matching borrower |
76 |
my @emails = ( $borrower->email, $borrower->emailpro, $borrower->B_email ); |
76 |
my @emails = ( $borrower->email || '', $borrower->emailpro || '', $borrower->B_email || ''); |
77 |
|
77 |
|
78 |
my $firstNonEmptyEmail = ''; |
78 |
my $firstNonEmptyEmail = ''; |
79 |
foreach my $address ( @emails ) { |
79 |
foreach my $address ( @emails ) { |
Lines 82-88
if ( $query->param('sendEmail') || $query->param('resendEmail') ) {
Link Here
|
82 |
} |
82 |
} |
83 |
|
83 |
|
84 |
# Is the given email one of the borrower's ? |
84 |
# Is the given email one of the borrower's ? |
85 |
if ( $email && !( grep { $_ eq $email } @emails ) ) { |
85 |
if ( $email && !( grep /^$email$/i, @emails ) ) { |
86 |
$hasError = 1; |
86 |
$hasError = 1; |
87 |
$errNoBorrowerFound = 1; |
87 |
$errNoBorrowerFound = 1; |
88 |
} |
88 |
} |
89 |
- |
|
|