/[A3C]/bin/ldap.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /bin/ldap.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 7 by dpavlin, Thu Mar 13 13:12:46 2008 UTC revision 8 by dpavlin, Thu Mar 13 13:49:41 2008 UTC
# Line 11  use Data::Dump qw/dump/; Line 11  use Data::Dump qw/dump/;
11    
12  BEGIN { Jifty->new; };  BEGIN { Jifty->new; };
13    
14  my $ldap = Net::LDAP->new( 'ldap1.skole.local' ) or die "$@";  #warn "# config->app(LDAP) = ",dump( Jifty->config->app('LDAP') );
15    
16    my $ldap = Net::LDAP->new( Jifty->config->app('LDAP')->{Server} ) or die "$@";
17    
18  # an anonymous bind  # an anonymous bind
19  my $mesg = $ldap->bind;  #my $mesg = $ldap->bind;
20    my $mesg = $ldap->bind(
21            DN       => Jifty->config->app('LDAP')->{DN},
22            password => Jifty->config->app('LDAP')->{Password},
23    );
24    
25  # perform a search  # perform a search
26  $mesg = $ldap->search(  $mesg = $ldap->search(
27          base   => "dc=skole,dc=hr",          base   => "dc=skole,dc=hr",
28  #       filter => "(&(sn=Barr) (o=Texas Instruments))",  #       filter => "(&(sn=Barr) (o=Texas Instruments))",
29          filter => "(objectClass=hrEduPerson)",          filter => "(objectClass=hrEduPerson)",
30          sizelimit => 100, # off          sizelimit => 3, # 0 = off
31  );  );
32    
33  if ( $mesg->code ) {  if ( $mesg->code ) {

Legend:
Removed from v.7  
changed lines
  Added in v.8

  ViewVC Help
Powered by ViewVC 1.1.26