@@ -, +, @@ --- C4/Auth_with_ldap.pm | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) --- a/C4/Auth_with_ldap.pm +++ a/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++) { --