View | Details | Raw Unified | Return to bug 4256
Collapse All | Expand All

(-)a/koha/srv/koha/C4/Auth_with_ldap.pm (-1 / +6 lines)
Lines 58-64 my $prefhost = $ldap->{hostname} or die ldapserver_error('hostname'); Link Here
58
my $base      = $ldap->{base}		or die ldapserver_error('base');
58
my $base      = $ldap->{base}		or die ldapserver_error('base');
59
$ldapname     = $ldap->{user}		;
59
$ldapname     = $ldap->{user}		;
60
$ldappassword = $ldap->{pass}		;
60
$ldappassword = $ldap->{pass}		;
61
our %mapping  = %{$ldap->{mapping}} || (); #	or die ldapserver_error('mapping');
61
our %mapping  = %{$ldap->{mapping}}; # FIXME dpavlin -- don't die because of || (); from 6eaf8511c70eb82d797c941ef528f4310a15e9f9
62
my @mapkeys = keys %mapping;
62
my @mapkeys = keys %mapping;
63
$debug and print STDERR "Got ", scalar(@mapkeys), " ldap mapkeys (  total  ): ", join ' ', @mapkeys, "\n";
63
$debug and print STDERR "Got ", scalar(@mapkeys), " ldap mapkeys (  total  ): ", join ' ', @mapkeys, "\n";
64
@mapkeys = grep {defined $mapping{$_}->{is}} @mapkeys;
64
@mapkeys = grep {defined $mapping{$_}->{is}} @mapkeys;
Lines 122-127 sub checkpw_ldap { Link Here
122
            $debug and warn "LDAP bind failed as kohauser $principal_name: ". description($res);
122
            $debug and warn "LDAP bind failed as kohauser $principal_name: ". description($res);
123
            return 0;
123
            return 0;
124
        }
124
        }
125
126
	# FIXME dpavlin -- we really need $userldapentry leater on even if using auth_by_bind!
127
	my $search = search_method($db, $userid) or return 0;   # warnings are in the sub
128
	$userldapentry = $search->shift_entry;
129
125
	} else {
130
	} else {
126
        my $search = search_method($db, $userid) or return 0;   # warnings are in the sub
131
        my $search = search_method($db, $userid) or return 0;   # warnings are in the sub
127
        $userldapentry = $search->shift_entry;
132
        $userldapentry = $search->shift_entry;

Return to bug 4256