summaryrefslogtreecommitdiff
path: root/plugins/kolab_activesync
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2013-10-29 14:56:33 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2013-10-29 14:56:33 (GMT)
commita26efff49528e33012829a76278aa5d4019a48df (patch)
treedab24d72d7c48f2504c4879611e1a610915e0270 /plugins/kolab_activesync
parent310e25d0d10fc503f82a32fffcd41d5f870a3d28 (diff)
downloadroundcubemail-plugins-kolab-a26efff49528e33012829a76278aa5d4019a48df.tar.gz
When removing a device, remove device data from syncroton database
Diffstat (limited to 'plugins/kolab_activesync')
-rw-r--r--plugins/kolab_activesync/kolab_activesync.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/kolab_activesync/kolab_activesync.php b/plugins/kolab_activesync/kolab_activesync.php
index ccd1d5c..05e1f35 100644
--- a/plugins/kolab_activesync/kolab_activesync.php
+++ b/plugins/kolab_activesync/kolab_activesync.php
@@ -400,6 +400,15 @@ class kolab_activesync extends rcube_plugin
}
}
}
+
+ // remove device data from syncroton database
+ $db = $this->rc->get_dbh();
+ $table = $db->table_name('syncroton_device');
+
+ if (in_array($table, $db->list_tables())) {
+ $db->query("DELETE FROM $table WHERE owner_id = ? AND deviceid = ?",
+ $this->rc->user->ID, $id);
+ }
}
return $result;