From 342bd664856c9e907339e69831366bebbfcb4250 Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Fri, 13 May 2005 00:28:28 +0000 Subject: [PATCH] Delete a users comments when the user is deleted. Return the correct value in cron/cleanup.php when looking for user associated data. --- cron/cleanup.php | 2 +- include/user.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cron/cleanup.php b/cron/cleanup.php index 79d592d..5e7000a 100644 --- a/cron/cleanup.php +++ b/cron/cleanup.php @@ -62,7 +62,7 @@ function hasDataAssociated($iUserId) $ob = mysql_fetch_object($hResult); if($ob->c != 0) return true; - $sQuery = "SELECT count(userId) as c FROM appMaintainerQueue WHERE userId = $iUserId"; + $sQuery = "SELECT count(userId) as c FROM appMaintainers WHERE userId = $iUserId"; $hResult = query_appdb($sQuery); $ob = mysql_fetch_object($hResult); if($ob->c != 0) return true; diff --git a/include/user.php b/include/user.php index 59457cf..08ef459 100644 --- a/include/user.php +++ b/include/user.php @@ -145,6 +145,7 @@ class User { $hResult3 = query_appdb("DELETE FROM user_prefs WHERE userid = '".$this->iUserId."'"); $hResult4 = query_appdb("DELETE FROM appVotes WHERE userid = '".$this->iUserId."'"); $hResult5 = query_appdb("DELETE FROM appMaintainers WHERE userid = '".$this->iUserId."'"); + $hResult6 = query_appdb("DELETE FROM appComments WHERE userId = '".$this->iUserId."'"); return($hResult = query_appdb("DELETE FROM user_list WHERE userid = '".$this->iUserId."'")); }