Bug 17775 - Add new user with LDAP not works under Plack

This patch fixes internal server error:

Undefined subroutine &C4::Auth_with_ldap::AddMember called at /srv/koha_ffzg/C4/Auth_with_ldap.pm line 213.

It occurs only under plack, and it's strange since C4::Members
does EXPORT AddMember and we are importing it into Auth_with_ldap.pm
(and it does work under CGI).

Signed-off-by: Liz Rea <liz@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
I did not test but trust author and signoffer. The change cannot hurt.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Dobrica Pavlinusic 2017-01-30 12:42:09 +01:00 committed by Kyle M Hall
parent eee1f23bc4
commit 4740438b41
1 changed files with 1 additions and 1 deletions

View File

@ -210,7 +210,7 @@ sub checkpw_ldap {
return(1, $cardnumber, $local_userid);
}
} elsif ($config{replicate}) { # A2, C2
$borrowernumber = AddMember(%borrower) or die "AddMember failed";
$borrowernumber = C4::Members::AddMember(%borrower) or die "AddMember failed";
C4::Members::Messaging::SetMessagingPreferencesFromDefaults( { borrowernumber => $borrowernumber, categorycode => $borrower{'categorycode'} } );
} else {
return 0; # B2, D2