Tomas Cohen Arazi
7a413f8015
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>
26 lines
1.1 KiB
Perl
Executable file
26 lines
1.1 KiB
Perl
Executable file
use Modern::Perl;
|
|
|
|
return {
|
|
bug_number => "25936",
|
|
description => "A password change notification feature",
|
|
up => sub {
|
|
my ($args) = @_;
|
|
my ($dbh, $out) = @$args{qw(dbh out)};
|
|
|
|
# Add PASSWORD_CHANGE notice
|
|
$dbh->do( q{
|
|
INSERT IGNORE INTO letter (module, code, name, title, content, message_transport_type) VALUES ('members', 'PASSWORD_CHANGE', 'Notification of password change', 'Library account password change notification',
|
|
"Dear [% borrower.firstname %] [% borrower.surname %],\r\n\r\nWe want to notify you that your password has been changed. If you did not change it yourself (or requested that change), please contact library staff.\r\n\r\nYour library.", 'email');
|
|
});
|
|
|
|
say $out "Added new letter 'PASSWORD_CHANGE' (email)";
|
|
|
|
# Add systempreference
|
|
$dbh->do(q{
|
|
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type)
|
|
VALUES ('NotifyPasswordChange','0','','Notify patrons whenever their password is changed.','YesNo')
|
|
});
|
|
|
|
say $out "Added new system preference 'NotifyPasswordChange'";
|
|
},
|
|
};
|