Bug 13602 - Username/password already exists when editing borrower attributes and...
authorOlli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
Tue, 20 Jan 2015 14:48:13 +0000 (16:48 +0200)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Mon, 9 Feb 2015 13:24:15 +0000 (10:24 -0300)
commit58f7f56b8664810335f60f3fe5e43faa079f33bc
tree99b6f18aa3c62b38e545a3756006e5f053196400
parent28af6c4d01e0b1a31dece34031b6379fb9befebc
Bug 13602 - Username/password already exists when editing borrower attributes and messaging preferences

When editing a Patron's messaging preferences or borrower attributes, one cannot
save changes because 'userid' is not given as a parameter.

It shouldn't, but the
Check_Userid($newdata{'userid'},$borrowernumber) -check must have it.

REPLICATE THE ISSUE:
1. Find a Borrower.
2. Go to the details-tab.
3. Under "Patron messaging preferences" click edit to edit just the messaging
   preferences.
4. Just save, no need to make any modifications.
5. Observe the error "Username/password already exists"
   This happens to all/most of the sub-forms in the Borrower's Details-view.

AFTER THIS PATCH:
Check_Userid() get the $userid from the new parameters, or if not present, from
the koha.borrowers-table.

TEST FOR REGRESSION:
1. Edit a borrower normally. Notice no errors.
2. Edit a sub-form (Alternate address/Patron messaging preferences). Notice no
   errors.

DISCLAIMER: You are free to steal/rip/modify/hack this patch to your soul's
extent without my permission. As long as it makes to Koha I am happy.

Works as expected.
Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
members/memberentry.pl