Beispiel #1
0
$account = new AccountModel($userid);
$account->init();
$host = new HostModel($userid);
$host->init();
$dns = new DnsModel($userid);
$dns->init();
$database = new DataBaseModel();
$username = $account->getUsername();
$user_domain = $username . "." . $domain;
$mail = new MailModel($user_domain);
// Appel de la méthode
// Mise en place des WHILE afin de vérifier et supprimer les sous-domaines,
// les boites mails et les entrées DNS avant la suppression definitive du compte
// HOST
$host->setUsername($username);
foreach ($host->getDatas() as $host_data) {
    $subdomain = $host_data['dns'];
    $host->deleteSubDomainVHFinal($subdomain);
}
$host->deleteUserVH();
// DNS
$dns->setUsername($username);
foreach ($dns->getDatas() as $dns_data) {
    $subdomain = $dns_data['sub_dom'];
    $type = $dns_data['type'];
    $target = $dns_data['target'];
    $dns->deleteUserSubDomainDnsFinal($subdomain, $type, $target);
}
$dns->deleteUser();
// Mail
foreach ($mail->getDatas() as $mail_data) {