Delete a users comments when the user is deleted. Return the correct
value in cron/cleanup.php when looking for user associated data.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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."'"));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user