[vhffs-dev] [svn] commit: r282 - /trunk/vhffs-api/src/Vhffs/User.pm |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
Author: gradator
Date: Sun Nov 5 05:55:59 2006
New Revision: 282
Log:
This commit fixes the bug 0000185, the popbox or the forward associated to a user on the mail domain is now deleted when the user is deleted.
Modified:
trunk/vhffs-api/src/Vhffs/User.pm
Modified: trunk/vhffs-api/src/Vhffs/User.pm
==============================================================================
--- trunk/vhffs-api/src/Vhffs/User.pm (original)
+++ trunk/vhffs-api/src/Vhffs/User.pm Sun Nov 5 05:55:59 2006
@@ -384,6 +384,19 @@
return -1 if ( ! defined $self->{'uid'} );
return -2 if ( $self->{'group'}->delete < 0 );
+ # delete mail user if mail_user is enabled
+ if( $self->{'main'}->get_config->use_mailuser == 1 )
+ {
+ use Vhffs::Services::Mail;
+ use Vhffs::Services::MailUser;
+ my $mu = init Vhffs::Services::MailUser( $self->{'main'} , $self );
+
+ if( defined $mu && $mu >= 0 )
+ {
+ $mu->delbox;
+ $mu->delforward;
+ }
+ }
$request = $self->{'db'}->{'DB_WRITE'}->prepare("DELETE FROM vhffs_panel_user_prefs WHERE uid='".$self->{'uid'}."'");
$request->execute() or return -2;