https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41132

--- Comment #7 from Jake Deery <[email protected]> ---
Created attachment 193002
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193002&action=edit
Bug 41132: Add branch and borrower to PASSWORD_RESET

This patch adds sanitised borrower - and branch - objects to the PASSWORD_RESET
email template. This allows TemplateToolkit access, as well as richer logic
options for branches that want greater email customisation.

Prior to testing (k.t.d):
a)  enter k.t.d with: ktd --shell
b)  sudo apt update && sudo apt install dialog -y
c)  sudo apt install exim4 -y
d)  sudo dpkg-reconfigure exim4-config
    *)  press enter to accept all defaults

To test:
== APPLY PATCH ==
a)  reset_all
b)  on the staff client, go to
/cgi-bin/koha/tools/letter.pl?op=add_form&branchcode=&module=members&code=PASSWORD_RESET
c)  under email, inspect the notice. see how it is now a tt notice, with
borrower and branch attributes
d)  go to /cgi-bin/koha/members/memberentry.pl?op=edit_form&borrowernumber=51
e)  under contact information, edit the primary email to be: root@localhost -
save
f)  go to
/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=OpacResetPassword&ok=Search
    *)  set OpacResetPassword to allowed
g)  on the opac, go to /cgi-bin/koha/opac-password-recovery.pl
    *)  remember to log out
    *)  enter 42 as the cardnumber, root@localhost as the email - submit
h)  on the staff client, go to
/cgi-bin/koha/members/notices.pl?borrowernumber=51
    *)  remember to log back in
    *)  click the most recent koha password recovery notice
i)  observe how the notice contains the borrower's name, userid, as well as the
branch name and (data-dependent) email address
j)  go to
/cgi-bin/koha/tools/letter.pl?op=add_form&branchcode=&module=members&code=PASSWORD_RESET
k)  edit the notice text, and add [% borrower.password %] at the end
l)  repeat steps g-h, possibly needing to additionally click get new password
recovery link
m)  observe how the notice is unchanged from step i), and the password is not
exposed
== SIGN OFF ==

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to