3 * @file include/remove_contact.php
4 * @brief Removes orphaned data from deleted contacts
7 use Friendica\Core\Config;
9 function remove_contact_run($argv, $argc) {
14 $id = intval($argv[1]);
16 // Only delete if the contact doesn't exist (anymore)
17 $r = dba::select('contact', array('id'), array('id' => $id), array('limit' => 1));
18 if (dbm::is_result($r)) {
22 // Now we delete all the depending table entries
23 dba::delete('contact', array('id' => $id));