Koha/installer/data/mysql/db_revs/220600035.pl
Tomas Cohen Arazi 7a413f8015
Bug 32191: Tidy upgrade scripts output
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-11-14 15:08:10 -03:00

16 lines
736 B
Perl
Executable file

use Modern::Perl;
return {
bug_number => "28787",
description => "Send a notice with the TOTP token",
up => sub {
my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)};
$dbh->do(q{
INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES
('members', '2FA_OTP_TOKEN', '', 'two-authentication step token', 0, 'Two-authentication step token', 'Dear [% borrower.firstname %] [% borrower.surname %] ([% borrower.cardnumber %])\r\n\r\nYour authentication token is [% otp_token %]. \r\nIt is valid one minute.', 'email')
});
say $out "Added new letter '2FA_OTP_TOKEN' (email)";
},
};