Bug 21390: Send registration verification emails immediately
authorChris Cormack <chrisc@catalyst.net.nz>
Wed, 4 Sep 2019 21:43:13 +0000 (21:43 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 17 Sep 2019 13:51:57 +0000 (14:51 +0100)
To test
1/ Enable self registration
2/ Register, notice message is queued in the table but not sent
3/ Apply patch
4/ Register again, notice message is queued, but immediately sent

Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

opac/opac-memberentry.pl

index 7dfcda3..62cdd0d 100755 (executable)
@@ -194,6 +194,9 @@ if ( $action eq 'create' ) {
                       C4::Context->preference('KohaAdminEmailAddress'),
                 }
             );
+            my $num_letters_attempted = C4::Letters::SendQueuedMessages( {
+                    letter_code => 'OPAC_REG_VERIFY'
+                    } );
         }
         else {
             ( $template, $borrowernumber, $cookie ) = get_template_and_user(