--- lib/LDAP/Koha.pm 2009/04/29 09:03:47 50 +++ lib/LDAP/Koha.pm 2009/04/29 09:18:11 51 @@ -26,8 +26,9 @@ our $passwd = 'unconfigured-password'; our $max_results = 3000; # FIXME must be enough for all users +our $objectclass_default = 'hrEduPerson'; -our $objectclass = 'HrEduPerson'; +our $objectclass; $SIG{__DIE__} = sub { warn "!!! DIE ", @_; @@ -156,6 +157,7 @@ my $sql_where = ''; @values = (); + $objectclass = ''; foreach my $filter ( keys %{ $reqData->{'filter'} } ) { @@ -185,6 +187,8 @@ } + $objectclass ||= $objectclass_default; + my $sql_select = read_file( lc "sql/$objectclass.sql" ); if ( $sql_where ) { if ( $sql_select !~ m{where}i ) {