<?php
// Delete all points from this user
$this->dbobject->query_write("
	UPDATE " . TABLE_PREFIX . "dbtech_vbmail_mailinglist
	SET ownerid = 0
	WHERE ownerid = " . $this->existing['userid'] . "
");
$this->dbobject->query_write("
	DELETE FROM " . TABLE_PREFIX . "dbtech_vbmail_subscription
	WHERE userid = " . $this->existing['userid'] . "
");
$this->dbobject->query_write("
	DELETE FROM " . TABLE_PREFIX . "dbtech_vbmail_subscriptionlog
	WHERE userid = " . $this->existing['userid'] . "
");
$this->dbobject->query_write("
	DELETE FROM " . TABLE_PREFIX . "dbtech_vbmail_subscriptionkeyword
	WHERE userid = " . $this->existing['userid'] . "
");

// Rebuild cache
VBMAIL_CACHE::build('mailinglist');
?>