Bugzilla – Attachment 35648 Details for
Bug 13602
Username/password already exists when editing borrower attributes and messaging preferences
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[Signed-off] Bug 13602 - Username/password already exists when editing borrower attributes and messaging preferences
Signed-off-Bug-13602---Usernamepassword-already-ex.patch (text/plain), 2.23 KB, created by
Marc Véron
on 2015-02-01 10:54:57 UTC
(
hide
)
Description:
[Signed-off] Bug 13602 - Username/password already exists when editing borrower attributes and messaging preferences
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2015-02-01 10:54:57 UTC
Size:
2.23 KB
patch
obsolete
>From e22f3c63d588a105c15398704ad9385f31b64b3d Mon Sep 17 00:00:00 2001 >From: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> >Date: Tue, 20 Jan 2015 16:48:13 +0200 >Subject: [PATCH] [Signed-off] Bug 13602 - Username/password already exists > when editing borrower attributes and messaging preferences >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >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> >--- > members/memberentry.pl | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/members/memberentry.pl b/members/memberentry.pl >index 5db8273..12d95c0 100755 >--- a/members/memberentry.pl >+++ b/members/memberentry.pl >@@ -328,8 +328,10 @@ if ($op eq 'save' || $op eq 'insert'){ > } > } > } >- # Check if the userid is unique >- unless (Check_Userid($newdata{'userid'},$borrowernumber)) { >+ # Check if the userid is unique. Userid might not always be present in the edited values list when editing certain sub-forms, so we need to dig for it a bit. >+ my $userid = $newdata{'userid'}; >+ $userid = $borrower_data->{userid} unless $userid; #Get the userid straight from the DB >+ unless (Check_Userid($userid,$borrowernumber)) { > push @errors, "ERROR_login_exist"; > } > >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13602
:
35404
|
35435
|
35436
|
35437
|
35648
|
35650
|
35651