Bug 21390: Send registration verification emails immediately

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>
This commit is contained in:
Chris Cormack 2019-09-04 21:43:13 +00:00 committed by Martin Renvoize
parent 44049ad57e
commit 957d583d2e
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 3 additions and 0 deletions

View File

@ -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(