summaryrefslogtreecommitdiffstatshomepage
path: root/services/commondescriptionservice.php
diff options
context:
space:
mode:
authorGravatar mensonge2009-01-07 09:10:28 +0000
committerGravatar mensonge2009-01-07 09:10:28 +0000
commit6f95a6af5389b3f3a3affd309ac73f689dee21b8 (patch)
tree533fd99a0c4bcf164bb664ff6c986bdd03dd9743 /services/commondescriptionservice.php
parentdb6172250228292146706690e2955074626a6ccd (diff)
downloadscuttle-6f95a6af5389b3f3a3affd309ac73f689dee21b8.tar.gz
scuttle-6f95a6af5389b3f3a3affd309ac73f689dee21b8.zip
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
Diffstat (limited to 'services/commondescriptionservice.php')
-rw-r--r--services/commondescriptionservice.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/services/commondescriptionservice.php b/services/commondescriptionservice.php
index 0a96f74..86e0c0f 100644
--- a/services/commondescriptionservice.php
+++ b/services/commondescriptionservice.php
@@ -140,6 +140,20 @@ class CommonDescriptionService {
}
+ function deleteDescriptionsForUser($uId){
+ $query = 'DELETE FROM '. $this->getTableName() . ' WHERE uId = '. intval($uId);
+
+ $this->db->sql_transaction('begin');
+ if (!($dbresult = & $this->db->sql_query($query))) {
+ $this->db->sql_transaction('rollback');
+ message_die(GENERAL_ERROR, 'Could not delete user descriptions', '',
+ __LINE__, __FILE__, $query, $this->db);
+ return false;
+ }
+
+ return true;
+ }
+
function deleteAll() {
$query = 'TRUNCATE TABLE `'. $this->getTableName() .'`';