56970ed02ae551b797933ba2eb60458588887f17
[srvgit] / installer / data / mysql / atomicupdate / bug_25936.pl
1 use Modern::Perl;
2
3 return {
4     bug_number => "25936",
5     description => "A password change notification feature",
6     up => sub {
7         my ($args) = @_;
8         my ($dbh, $out) = @$args{qw(dbh out)};
9
10         # Add PASSWORD_CHANGE notice
11         $dbh->do( q{
12             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',
13             "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');
14         });
15
16         # Add systempreference
17         $dbh->do(q{
18             INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type)
19             VALUES ('NotifyPasswordChange','0','','Notify patrons whenever their password is changed.','YesNo')
20         });
21     },
22 };