]> git.koha-community.org Git - koha.git/commit
Bug 19366: Do not block patron's detail update if EmailMustBeUnique
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 27 Sep 2017 16:44:00 +0000 (13:44 -0300)
committerKatrin Fischer <katrin.fischer.83@web.de>
Wed, 18 Oct 2017 21:21:10 +0000 (23:21 +0200)
commit6a6f704d02d0ca0ab973afcb6729fa5e47c15f1a
tree752ca5a4affa11a0116ad985546afdf9681ea13c
parentffd14c3d285c34fb5728d71d051fce022bf1f316
Bug 19366: Do not block patron's detail update if EmailMustBeUnique

If the pref PatronSelfRegistrationEmailMustBeUnique is set ("consider"),
a patron is not allowed to register with an existing email address.
The existing code is wrong and reject a patron that is updating their
personal details with "This email address already exists in our
database.", even if the patron did not modify their email address.

This is caused by the query we made, we must search for patron with this
email address but who is not the current patron.

Test plan:
- Set PatronSelfRegistrationEmailMustBeUnique to "consider"
- Register a new patron with an existing email address
=> you should not be allowed
- Use a non-existent email address
=> You should be allowed
- Edit your patron details
- Modify some infos
=> Should pass
- Modify your email address with an existing one
=> You should not be allowed to do that

Followed test plan, patches worked as described
Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit ae02cf97e469a17d3bdc9d5c7db702960fd620c8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit e23822b869ea66f63ce6c6027e418c79e3c7ba04)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
opac/opac-memberentry.pl