From 7c6805c37f2dce703faa9efa9cceeb269e8f9a1c Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 16 Jun 2022 15:23:28 +0100 Subject: [PATCH] Bug 30646: (follow-up) Set to send immediately Other welcome notices send immediately rather than waiting on the queue to be processed.. these one's should too. Signed-off-by: Kyle M Hall --- C4/Auth_with_ldap.pm | 4 +++- C4/Auth_with_shibboleth.pm | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/C4/Auth_with_ldap.pm b/C4/Auth_with_ldap.pm index 86cdb9185f..f13dbdcf8e 100644 --- a/C4/Auth_with_ldap.pm +++ b/C4/Auth_with_ldap.pm @@ -23,7 +23,7 @@ use Carp qw( croak ); use C4::Context; use C4::Members::Messaging; use C4::Auth qw( checkpw_internal ); -use C4::Letters qw( GetPreparedLetter EnqueueLetter ); +use C4::Letters qw( GetPreparedLetter EnqueueLetter SendQueuedMessages ); use Koha::Patrons; use Koha::AuthUtils qw( hash_password ); use Net::LDAP; @@ -260,6 +260,8 @@ sub checkpw_ldap { message_transport_type => 'email' } ); + + C4::Letters::SendQueuedMessages( { message_id => $message_id } ); } } } else { diff --git a/C4/Auth_with_shibboleth.pm b/C4/Auth_with_shibboleth.pm index 8801530857..9474fdb111 100644 --- a/C4/Auth_with_shibboleth.pm +++ b/C4/Auth_with_shibboleth.pm @@ -23,7 +23,7 @@ use C4::Context; use Koha::AuthUtils qw( get_script_name ); use Koha::Database; use Koha::Patrons; -use C4::Letters qw( GetPreparedLetter EnqueueLetter ); +use C4::Letters qw( GetPreparedLetter EnqueueLetter SendQueuedMessages ); use C4::Members::Messaging; use Carp qw( carp ); use List::MoreUtils qw( any ); @@ -169,6 +169,7 @@ sub _autocreate { message_transport_type => 'email' } ); + C4::Letters::SendQueuedMessages( { message_id => $message_id } ); } } return ( 1, $patron->cardnumber, $patron->userid ); -- 2.20.1