Last change
on this file since 1834 was
1365,
checked in by nanardon, 9 years ago
|
Exchange manager and managerContact attribute to propagate manager to other bases
|
-
Property svn:executable set to
*
|
File size:
1007 bytes
|
Line | |
---|
1 | #!/usr/bin/perl |
---|
2 | |
---|
3 | # $Id: la-find-expired 2795 2010-07-31 10:04:13Z nanardon $ |
---|
4 | |
---|
5 | use strict; |
---|
6 | use warnings; |
---|
7 | use LATMOS::Accounts::Maintenance; |
---|
8 | use LATMOS::Accounts::Log; |
---|
9 | use Getopt::Long; |
---|
10 | use Pod::Usage; |
---|
11 | |
---|
12 | =head1 NAME |
---|
13 | |
---|
14 | la-warn-expire - query expiration of user and send mail |
---|
15 | |
---|
16 | =head1 SYNOPSIS |
---|
17 | |
---|
18 | la-warn-expire [options] |
---|
19 | |
---|
20 | =cut |
---|
21 | |
---|
22 | GetOptions( |
---|
23 | 'c|config=s' => \my $config, |
---|
24 | 'help' => sub { pod2usage(0) }, |
---|
25 | 'old=s' => \my $delay, |
---|
26 | 'test' => \my $test, |
---|
27 | ) or pod2usage(); |
---|
28 | |
---|
29 | =head1 OPTIONS |
---|
30 | |
---|
31 | =over 4 |
---|
32 | |
---|
33 | =item -c|--config configdir |
---|
34 | |
---|
35 | Use this configuration directory instead of the default one. |
---|
36 | |
---|
37 | =back |
---|
38 | |
---|
39 | =cut |
---|
40 | |
---|
41 | my $LA = LATMOS::Accounts::Maintenance->new($config); |
---|
42 | |
---|
43 | foreach ($LA->find_expired_users($delay)) { |
---|
44 | my $obj = $LA->_base->get_object('user', $_); |
---|
45 | printf("%s - %s (%s%s)\n", $obj->id, $obj->get_attributes('displayName'), |
---|
46 | $obj->get_attributes('expireText'), |
---|
47 | ($obj->get_attributes('manager') ? ' ' . |
---|
48 | $obj->get_attributes('manager') : ''), |
---|
49 | ); |
---|
50 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.