Bug 10796: Use $category->effective_change_password in the OPAC
authorTomas Cohen Arazi <tomascohen@theke.io>
Wed, 20 Feb 2019 16:58:35 +0000 (13:58 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 12 Apr 2019 02:32:07 +0000 (02:32 +0000)
commite155e6d5bba7b48245b2679d5f0b28d46761db93
tree87d23b4a0bd7a7e3d753c0803dca6f4382872b7e
parentd96fc928560e5353a805ec079bbde26a7e8dc4ce
Bug 10796: Use $category->effective_change_password in the OPAC

This patch makes the OPAC pages that rely on OpacPasswordChange use the
current patron's category to make the decision to allow password change
or not.

It does so by making sure all the places in which OpacPasswordChange was
used, use $logged_in_user->category->effective_change_password instead.

Special attention is required on the case of opac-registration-verify.pl
in which the use of an unblessed Koha::Patron object is changed in
favour of the blessed object, so we can actually use the new method to
make a decision on the text to display.

To test:
- Go through the OPAC pages, check that the password change strings and
links are displayed only whne appropriate.
- Sign off :-D

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
koha-tmpl/opac-tmpl/bootstrap/en/includes/usermenu.inc
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-passwd.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-registration-confirmation.tt
opac/opac-memberentry.pl
opac/opac-passwd.pl
opac/opac-registration-verify.pl