Bugzilla – Attachment 88192 Details for
Bug 22461
Regression in #20287: LDAP user replication broken with mapped extended patron attributes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22461: Fix LDAP user replication
Bug-22461-Fix-LDAP-user-replication.patch (text/plain), 1.55 KB, created by
Alex Arnaud
on 2019-04-17 13:10:54 UTC
(
hide
)
Description:
Bug 22461: Fix LDAP user replication
Filename:
MIME Type:
Creator:
Alex Arnaud
Created:
2019-04-17 13:10:54 UTC
Size:
1.55 KB
patch
obsolete
>From f5d4211b46ef4d15d7be4b2b5faeacc4dd6a13c5 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 15 Mar 2019 20:16:41 -0300 >Subject: [PATCH] Bug 22461: Fix LDAP user replication > >From bug 20287: >- $borrowernumber = C4::Members::AddMember(%borrower) or die "AddMember failed"; >+ Koha::Patron->new( \%borrower )->store; > C4::Members::Messaging::SetMessagingPreferencesFromDefaults( { borrowernumber => $borrowernumber, categorycode => $borrower{'categorycode'} } ); > >$borrowernumber is not updated with the value of the newly created patron > >This patch restores the previous behavior (as well as the die) > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com> >--- > C4/Auth_with_ldap.pm | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/C4/Auth_with_ldap.pm b/C4/Auth_with_ldap.pm >index d9841a8..3e2ab5c 100644 >--- a/C4/Auth_with_ldap.pm >+++ b/C4/Auth_with_ldap.pm >@@ -221,7 +221,9 @@ sub checkpw_ldap { > return(1, $cardnumber, $local_userid); > } > } elsif ($config{replicate}) { # A2, C2 >- Koha::Patron->new( \%borrower )->store; >+ my $patron = Koha::Patron->new( \%borrower )->store; >+ die "Insert of new patron failed" unless $patron; >+ $borrowernumber = $patron->borrowernumber; > C4::Members::Messaging::SetMessagingPreferencesFromDefaults( { borrowernumber => $borrowernumber, categorycode => $borrower{'categorycode'} } ); > } else { > return 0; # B2, D2 >-- >2.7.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 22461
:
86696
|
86697
|
86856
|
87721
|
87722
|
87723
| 88192 |
88193
|
88194
|
88921