diff options
author | ivan <ivan> | 2000-07-17 10:53:42 +0000 |
---|---|---|
committer | ivan <ivan> | 2000-07-17 10:53:42 +0000 |
commit | 41e9b7ac95959d4392a7aee9b8aef1cc301a1eb6 (patch) | |
tree | e82b61856dbe48cb4b4631da33704ce54d637852 | |
parent | ec0441faaefa3fa2bd41e88ddc4bd3049198612a (diff) |
prevent accounts which are the target of mail aliases from being deleted
-rw-r--r-- | FS/FS/svc_acct.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm index 5986bff87..93b657f2d 100644 --- a/FS/FS/svc_acct.pm +++ b/FS/FS/svc_acct.pm @@ -12,6 +12,7 @@ use FS::svc_Common; use FS::SSH qw(ssh); use FS::part_svc; use FS::svc_acct_pop; +use FS::svc_acct_sm; @ISA = qw( FS::svc_Common ); @@ -223,6 +224,9 @@ sub delete { my $self = shift; my $error; + return "Can't delete an account which has mail aliases pointed to it!" + if $self->uid && qsearch( 'svc_acct_sm', { 'domuid' => $self->uid } ); + local $SIG{HUP} = 'IGNORE'; local $SIG{INT} = 'IGNORE'; local $SIG{QUIT} = 'IGNORE'; @@ -532,7 +536,7 @@ sub radius_check { =head1 VERSION -$Id: svc_acct.pm,v 1.11 2000-07-17 10:37:27 ivan Exp $ +$Id: svc_acct.pm,v 1.12 2000-07-17 10:53:42 ivan Exp $ =head1 BUGS |