projects
/
licom.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
668385f
)
mutt-licom.pl is working now.
author
octo
<octo>
Sun, 24 Apr 2005 21:27:43 +0000
(21:27 +0000)
committer
octo
<octo>
Sun, 24 Apr 2005 21:27:43 +0000
(21:27 +0000)
lib/LiCoM/Person.pm
patch
|
blob
|
history
mutt-licom.pl
patch
|
blob
|
history
diff --git
a/lib/LiCoM/Person.pm
b/lib/LiCoM/Person.pm
index
d51ad28
..
cbc2eab
100644
(file)
--- a/
lib/LiCoM/Person.pm
+++ b/
lib/LiCoM/Person.pm
@@
-304,7
+304,7
@@
sub search
$filter = '(objectclass=inetOrgPerson)';
}
$filter = '(objectclass=inetOrgPerson)';
}
- print STDERR "Debug: using filter: $filter";
+
#
print STDERR "Debug: using filter: $filter";
$mesg = $Ldap->search
(
$mesg = $Ldap->search
(
@@
-442,6
+442,9
@@
sub AUTOLOAD
my $obj = shift;
my @values = @_;
my $field = $Person::AUTOLOAD;
my $obj = shift;
my @values = @_;
my $field = $Person::AUTOLOAD;
+
+ return (undef) unless ($field);
+
$field =~ s/.*:://;
return (set ($obj, $field, @values ? [@values] : undef))
$field =~ s/.*:://;
return (set ($obj, $field, @values ? [@values] : undef))
diff --git
a/mutt-licom.pl
b/mutt-licom.pl
index
894bd1e
..
07e669c
100755
(executable)
--- a/
mutt-licom.pl
+++ b/
mutt-licom.pl
@@
-28,6
+28,14
@@
for (@ARGV)
die ('No (valid) patterns found.') unless (@Patterns);
die ('No (valid) patterns found.') unless (@Patterns);
+LiCoM::Person->connect
+(
+ uri => $Config->{'uri'},
+ base_dn => $Config->{'base_dn'},
+ bind_dn => $Config->{'bind_dn'},
+ password => $Config->{'password'}
+) or die;
+
our @Matches = LiCoM::Person->search (@Patterns, [[mail => '*']]);
print STDOUT scalar (@Matches), ' ', (scalar (@Matches) == 1 ? 'entry' : 'entries'), " found.\n";
our @Matches = LiCoM::Person->search (@Patterns, [[mail => '*']]);
print STDOUT scalar (@Matches), ' ', (scalar (@Matches) == 1 ? 'entry' : 'entries'), " found.\n";