]> git.koha-community.org Git - koha.git/commit
Bug 22048: Use set_password in member-password.pl
authorTomas Cohen Arazi <tomascohen@theke.io>
Wed, 12 Dec 2018 17:43:36 +0000 (14:43 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 25 Jan 2019 20:15:28 +0000 (20:15 +0000)
commitabea0ea9d209805e5a9932265fdd9a3ccdbdd53b
tree4b3083d6db3327625d394170dabd4f9c9582803e
parent828ab70be705b5bc90d995dabf7787e608bd51e0
Bug 22048: Use set_password in member-password.pl

This patch makes member-password.pl use $patron->set_password instead of
update_password. The side effect is that setting password and userid
become separate steps in the code.

For the password all the initial checks are the same, but password
strength is checked on calling set_password and an exception is thrown.
So instead of checking the password quality, we just wait for exceptions
and behave the same as before.

Bonus: you will notice I reused the initially fetched $patron object.
Things get simpler :-D

To test:
- Verify that changing the password / userid for a patron works as usual

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt
members/member-password.pl