View | Details | Raw Unified | Return to bug 41132
Collapse All | Expand All

(-)a/Koha/Patron/Password/Recovery.pm (-1 / +8 lines)
Lines 131-136 sub SendPasswordRecoveryEmail { Link Here
131
    my $opacbase = C4::Context->preference('OPACBaseURL') || '';
131
    my $opacbase = C4::Context->preference('OPACBaseURL') || '';
132
    my $uuidLink = $opacbase . "/cgi-bin/koha/opac-password-recovery.pl?uniqueKey=$uuid_str";
132
    my $uuidLink = $opacbase . "/cgi-bin/koha/opac-password-recovery.pl?uniqueKey=$uuid_str";
133
133
134
    # create a sanitised borrower hash
135
    my $user    = $borrower->unblessed;
136
    my $library = $borrower->library;
137
    $user->{branchname} = $library ? $library->branchname : '';
138
    delete $user->{password};
139
134
    # prepare the email
140
    # prepare the email
135
    my $letter = C4::Letters::GetPreparedLetter(
141
    my $letter = C4::Letters::GetPreparedLetter(
136
        module      => 'members',
142
        module      => 'members',
Lines 138-147 sub SendPasswordRecoveryEmail { Link Here
138
        branchcode  => $borrower->branchcode,
144
        branchcode  => $borrower->branchcode,
139
        lang        => $borrower->lang,
145
        lang        => $borrower->lang,
140
        substitute  => { passwordreseturl => $uuidLink, user => $borrower->userid },
146
        substitute  => { passwordreseturl => $uuidLink, user => $borrower->userid },
147
        tables      => { branches         => $borrower->branchcode },
148
        objects     => { borrower         => $user },
141
    );
149
    );
142
150
143
    # define from emails
151
    # define from emails
144
    my $library   = $borrower->library;
145
    my $kohaEmail = $library->from_email_address;    # send from patron's branch or Koha Admin
152
    my $kohaEmail = $library->from_email_address;    # send from patron's branch or Koha Admin
146
153
147
    my $message_id = C4::Letters::EnqueueLetter(
154
    my $message_id = C4::Letters::EnqueueLetter(
(-)a/installer/data/mysql/en/mandatory/sample_notices.yml (-5 / +8 lines)
Lines 1548-1561 tables: Link Here
1548
          message_transport_type: email
1548
          message_transport_type: email
1549
          lang: default
1549
          lang: default
1550
          content:
1550
          content:
1551
            - "<p>This email has been sent in response to your password recovery request for the account <strong><<user>></strong>."
1551
            - "<p>Dear [% borrower.firstname %] [% borrower.surname %]</p>"
1552
            - "</p>"
1552
            - "<p>This email has been sent in response to your password recovery request for the account <strong>[% borrower.userid %]</strong>.</p>"
1553
            - "<p>"
1553
            - "<p>"
1554
            - "You can now create your new password using the following link:"
1554
            - "You can now create your new password using the following link:<br />"
1555
            - "<br><a href=\"<<passwordreseturl>>\"><<passwordreseturl>></a>"
1555
            - "<a href=\"[% passwordreseturl %]\">[% passwordreseturl %]</a>"
1556
            - "</p>"
1556
            - "</p>"
1557
            - "<p>This link will be valid for 2 days from this email's reception, then you must reapply if you do not change your password.</p>"
1557
            - "<p>This link will be valid for 2 days from this email's reception, then you must reapply if you do not change your password.</p>"
1558
            - "<p>Thank you.</p>"
1558
            - "<p>Thank you.</p>"
1559
            - "<p>"
1560
            - "[% branch.branchname %]<br />"
1561
            - "[% branch.branchemail %]"
1562
            - "</p>"
1559
1563
1560
        - module: members
1564
        - module: members
1561
          code: STAFF_PASSWORD_RESET
1565
          code: STAFF_PASSWORD_RESET
1562
- 

Return to bug 41132