|
|
@ -109,6 +109,7 @@ foreach my $u (@lock){ |
|
|
|
event_signal('user-expire-account', $u); |
|
|
|
event_signal('user-expire-account', $u); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Accounts to be deleted |
|
|
|
foreach my $u (@delete){ |
|
|
|
foreach my $u (@delete){ |
|
|
|
my $user = $a->get($u); |
|
|
|
my $user = $a->get($u); |
|
|
|
if (!$user || !$user->prop('type') || $user->prop('type') ne 'user'){ |
|
|
|
if (!$user || !$user->prop('type') || $user->prop('type') ne 'user'){ |
|
|
@ -133,10 +134,11 @@ foreach my $u (@delete){ |
|
|
|
getpwnam($u)->dir |
|
|
|
getpwnam($u)->dir |
|
|
|
); |
|
|
|
); |
|
|
|
if ($res == 0){ |
|
|
|
if ($res == 0){ |
|
|
|
print $u . ": Data archived as $tar, the user account will now be deleted\n" if ($debug); |
|
|
|
print $u . ": Data archived as $tar. The user account will now be deleted\n" if ($debug); |
|
|
|
$user->set_prop(type => 'user-deleted'); |
|
|
|
$user->set_prop(type => 'user-deleted'); |
|
|
|
event_signal('user-delete', $u); |
|
|
|
event_signal('user-delete', $u); |
|
|
|
$a = esmith::AccountsDB->open || die "Couldn't open AccountsDB\n"; |
|
|
|
$a = esmith::AccountsDB->open || die "Couldn't open AccountsDB\n"; |
|
|
|
|
|
|
|
$a->get($u)->delete; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|