Only list inactive users which have been locked by expiration

tags/smeserver-expire-accounts-0.1.7-1 0.1.2_el5
Daniel Berteaud 9 years ago
parent 47ae43fa7c
commit 9a20728e63
  1. 7
      root/usr/share/perl5/vendor_perl/esmith/FormMagick/Panel/expireaccounts.pm

@ -135,6 +135,8 @@ sub print_user_table {
my $fwd = $u->prop('ForwardAddress') || '';
my $action = "<a href=\"$scriptname?page=0&page_stack=&acctName=$username&wherenext=ModifyLocked\">" .
$self->localise('MODIFY') . "</a>";
# Skip if not locked by this contrib
next unless ($locked_on =~ m/^\d{4}\-\d{1,2}\-\d{1,2}$/);
my $days_left = '';
if ($delete_in =~ m/^\d+$/ && $locked_on =~ m/^(\d{4})\-(\d{1,2})\-(\d{1,2})$/){
my $locked_date = eval {
@ -297,7 +299,10 @@ sub _count_active_users{
sub _count_inactive_users{
my $users = 0;
foreach my $user ($a->users){
$users++ unless ($user->prop('PasswordSet') || 'no') eq 'yes';
if (($user->prop('PasswordSet') || 'no') eq 'no' &&
($user->prop('ExpireLockedOn') || '') =~ m/^\d{4}\-\d{1,2}\-\d{1,2}$/){
$users++;
}
}
return $users;
}

Loading…
Cancel
Save