Bug 42645: Use notice_email_address in ModSuggestion SMS fallback check
The FallbackToSMSIfNoEmail transport selection in ModSuggestion() was checking $patron->email (the raw borrowers.email column) rather than $patron->notice_email_address, which respects the EmailFieldPrimary and EmailFieldPrecedence system preferences. Patrons with only emailpro or B_email set were incorrectly receiving suggestion status-change notices via SMS even when a valid email address was available. Sponsored-by: OpenFifth <https://openfifth.co.uk/> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
59b9b74fc3
commit
1d9237f6b6
|
|
@ -108,7 +108,7 @@ sub ModSuggestion {
|
|||
my $transport =
|
||||
( C4::Context->preference("FallbackToSMSIfNoEmail") )
|
||||
&& ( $patron->smsalertnumber )
|
||||
&& ( !$patron->email ) ? 'sms' : 'email';
|
||||
&& ( !$patron->notice_email_address ) ? 'sms' : 'email';
|
||||
|
||||
if (
|
||||
my $letter = C4::Letters::GetPreparedLetter(
|
||||
|
|
|
|||
Loading…
Reference in New Issue