From 6f95a6af5389b3f3a3affd309ac73f689dee21b8 Mon Sep 17 00:00:00 2001 From: mensonge Date: Wed, 7 Jan 2009 09:10:28 +0000 Subject: Bug Fix: delete really all user's data when removing a user git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@221 b3834d28-1941-0410-a4f8-b48e95affb8f --- services/tagstatservice.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'services/tagstatservice.php') diff --git a/services/tagstatservice.php b/services/tagstatservice.php index 3a08bc0..9d3ca5d 100644 --- a/services/tagstatservice.php +++ b/services/tagstatservice.php @@ -169,6 +169,18 @@ class TagStatService { $this->db->sql_query($query); } + function deleteTagStatForUser($uId) { + $query = 'DELETE FROM '. $this->getTableName() .' WHERE uId = '. intval($uId); + + if (!($dbresult = & $this->db->sql_query($query))) { + message_die(GENERAL_ERROR, 'Could not delete tag stats', '', __LINE__, + __FILE__, $query, $this->db); + return false; + } + + return true; + } + function deleteAll() { $query = 'TRUNCATE TABLE `'. $this->getTableName() .'`'; $this->db->sql_query($query); -- cgit v1.2.3