From 30a003506eaa161fdcd2bfc01f65c5959f725185 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Tue, 13 Jul 2010 23:40:44 +0200 Subject: [PATCH] Bug 4995 - extended attributes replication from LDAP --- C4/Auth_with_ldap.pm | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/C4/Auth_with_ldap.pm b/C4/Auth_with_ldap.pm index b25697c..d3f8333 100644 --- a/C4/Auth_with_ldap.pm +++ b/C4/Auth_with_ldap.pm @@ -164,9 +164,8 @@ sub checkpw_ldap { } if (C4::Context->preference('ExtendedPatronAttributes') && $borrowernumber && ($config{update} ||$config{replicate})) { my @types = C4::Members::AttributeTypes::GetAttributeTypes(); - my @attributes = grep{my $key=$_; any{$_ eq $key}@types;} keys %borrower; - my $extended_patron_attributes = map{{code=>$_,value=>$borrower{$_}}}@attributes; - my $extended_patron_attributes = [] unless $extended_patron_attributes; + my @attributes = grep{my $key=$_; any{$_->{code} eq $key}@types;} keys %borrower; + my $extended_patron_attributes = [ map{{code=>$_,value=>$borrower{$_}}}@attributes ]; my @errors; #Check before add for (my $i; $i< scalar(@$extended_patron_attributes)-1;$i++) { -- 1.5.6.5