Vilma_Driver::deleteDomain PHP Method

deleteDomain() public method

Deletes a domain and all the users and virtuals within it.
public deleteDomain ( integer $domain_id )
$domain_id integer The id of the domain to delete.
    public function deleteDomain($domain_id)
    {
        $domain_record = $this->getDomain($domain_id);
        $users = $this->getUsers($domain_record['domain_name']);
        foreach ($users as $user) {
            $this->deleteUser($user['user_id']);
        }
        $this->_deleteDomain($domain_id);
        try {
            Horde::callHook('deleteDomain', array($domain_record['domain_name']), 'vilma');
        } catch (Horde_Exception_HookNotSet $e) {
        }
    }