]> git.koha-community.org Git - koha.git/commit
Bug 22047: Add 'skip_validation' param to Koha::Patron->set_password
authorTomas Cohen Arazi <tomascohen@theke.io>
Wed, 26 Dec 2018 15:37:07 +0000 (12:37 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 25 Jan 2019 20:11:41 +0000 (20:11 +0000)
commit0f0e064a2b232949185a9ee7ef2c911325d15591
tree553b41ef0c0b2c2b81c8326dda26033a407687e2
parent983c1193fa5a5594f69e88fbbd2b2614a2763bc9
Bug 22047: Add 'skip_validation' param to Koha::Patron->set_password

This patch makes Koha::Patron->set_password expect a hashref as param
and adds support for an 'skip_validation' param to be passed. Its purpose is to
make the method skip the relevant password strength checks if required.

It targets the Auth_with_ldap.pm usage when the 'update_password' flag
is set in the configuration.

The tests on this bug cover this use case so, to test:

- Apply the tests patch
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Patrons.t
=> FAIL: Tests fail, code doesn't work as expected
- Apply this patch
- Run:
 k$ prove t/db_dependent/Koha/Patrons.t
=> SUCCESS: Tests pass! Yay!
- Sign off :-D

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/Patron.pm