Bugzilla – Attachment 63410 Details for
Bug 14625
LDAP: mapped ExtendedPatronAttributes cause error when updated on authentication
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED OFF] Bug 14625 - LDAP: skip extended patron attributes in 'borrowers' attribute update
Bug-14625---LDAP-skip-extended-patron-attributes-i.patch (text/plain), 1.51 KB, created by
Martin Renvoize (ashimema)
on 2017-05-12 07:24:20 UTC
(
hide
)
Description:
[SIGNED OFF] Bug 14625 - LDAP: skip extended patron attributes in 'borrowers' attribute update
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2017-05-12 07:24:20 UTC
Size:
1.51 KB
patch
obsolete
>From e0e12d00163cd9c89fbd83edc0a9c4cb9e20b834 Mon Sep 17 00:00:00 2001 >From: Oliver Bock <oliver.bock@aei.mpg.de> >Date: Mon, 30 Nov 2015 13:57:58 +0100 >Subject: [PATCH] Bug 14625 - LDAP: skip extended patron attributes in > 'borrowers' attribute update > >* Any extended patron attributes will cause the update to fail as those attributes don't exist in the 'borrowers' table >* The update of the extended patron attributes is already dealt with in checkpw_ldap() >* Ergo: just skip those attributes here > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Auth_with_ldap.pm | 9 +++++++++ > 1 file changed, 9 insertions(+) > >diff --git a/C4/Auth_with_ldap.pm b/C4/Auth_with_ldap.pm >index 91d3f63..bbb1094 100644 >--- a/C4/Auth_with_ldap.pm >+++ b/C4/Auth_with_ldap.pm >@@ -363,7 +363,16 @@ sub update_local { > my $borrowerid = shift or croak "No borrowerid"; > my $borrower = shift or croak "No borrower record"; > >+ # skip extended patron attributes in 'borrowers' attribute update > my @keys = keys %$borrower; >+ if (C4::Context->preference('ExtendedPatronAttributes')) { >+ foreach my $attribute_type ( C4::Members::AttributeTypes::GetAttributeTypes() ) { >+ my $code = $attribute_type->{code}; >+ @keys = grep { $_ ne $code } @keys; >+ $debug and printf STDERR "ignoring extended patron attribute '%s' in update_local()\n", $code; >+ } >+ } >+ > my $dbh = C4::Context->dbh; > my $query = "UPDATE borrowers\nSET " . > join(',', map {"$_=?"} @keys) . >-- >2.1.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 14625
:
45222
|
63410
|
63537