Bugzilla – Attachment 87722 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: Filter ldap mapping before inserting patron's info
Bug-22461-Filter-ldap-mapping-before-inserting-pat.patch (text/plain), 1.27 KB, created by
Martin Renvoize (ashimema)
on 2019-04-10 13:42:25 UTC
(
hide
)
Description:
Bug 22461: Filter ldap mapping before inserting patron's info
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-04-10 13:42:25 UTC
Size:
1.27 KB
patch
obsolete
>From 91b6ac0161b86fc6f01eba673f750314ef695714 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 21 Mar 2019 14:05:49 -0300 >Subject: [PATCH] Bug 22461: Filter ldap mapping before inserting patron's info > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Auth_with_ldap.pm | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > >diff --git a/C4/Auth_with_ldap.pm b/C4/Auth_with_ldap.pm >index 3e2ab5cb86..6def54d415 100644 >--- a/C4/Auth_with_ldap.pm >+++ b/C4/Auth_with_ldap.pm >@@ -221,7 +221,14 @@ sub checkpw_ldap { > return(1, $cardnumber, $local_userid); > } > } elsif ($config{replicate}) { # A2, C2 >- my $patron = Koha::Patron->new( \%borrower )->store; >+ my @columns = Koha::Patrons->columns; >+ my $patron = Koha::Patron->new( >+ map { >+ grep join( ' ', @columns ) =~ /$_/ >+ ? ( $_ => $data{$_} ) >+ : () >+ } keys %borrower >+ )->store; > die "Insert of new patron failed" unless $patron; > $borrowernumber = $patron->borrowernumber; > C4::Members::Messaging::SetMessagingPreferencesFromDefaults( { borrowernumber => $borrowernumber, categorycode => $borrower{'categorycode'} } ); >-- >2.20.1
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