1
0
Fork 0
friendica_2020-09-1_sharedH.../include/remove_contact.php

25 lines
463 B
PHP
Raw Normal View History

<?php
/**
* @file include/remove_contact.php
* @brief Removes orphaned data from deleted contacts
*/
use Friendica\Core\Config;
function remove_contact_run($argv, $argc) {
if ($argc != 2) {
return;
}
$id = intval($argv[1]);
// Only delete if the contact doesn't exist (anymore)
2017-08-12 10:55:50 +02:00
$r = dba::exists('contact', array('id' => $id));
if ($r) {
return;
}
2017-05-01 08:35:41 +02:00
// Now we delete all the depending table entries
dba::delete('contact', array('id' => $id));
}