Delete the user record in the AccountDB

tags/smeserver-expire-accounts-0.1.7-1
Daniel Berteaud 8 years ago
parent c7c231887c
commit f9c6658139
  1. 4
      root/sbin/e-smith/expire-accounts

@ -109,6 +109,7 @@ foreach my $u (@lock){
event_signal('user-expire-account', $u);
}
# Accounts to be deleted
foreach my $u (@delete){
my $user = $a->get($u);
if (!$user || !$user->prop('type') || $user->prop('type') ne 'user'){
@ -133,10 +134,11 @@ foreach my $u (@delete){
getpwnam($u)->dir
);
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');
event_signal('user-delete', $u);
$a = esmith::AccountsDB->open || die "Couldn't open AccountsDB\n";
$a->get($u)->delete;
}
}
}

Loading…
Cancel
Save