1
0
Fork 0
friendica_2020-09-1_sharedH.../src/Worker/RemoveContact.php
2017-12-17 15:26:43 -05:00

25 lines
504 B
PHP

<?php
/**
* @file src/Worker/RemoveContact.php
* @brief Removes orphaned data from deleted contacts
*/
namespace Friendica\Worker;
use Friendica\Core\Config;
use dba;
require_once 'include/dba.php';
class RemoveContact {
public static function execute($id) {
// Only delete if the contact doesn't exist (anymore)
$r = dba::exists('contact', array('id' => $id));
if ($r) {
return;
}
// Now we delete all the depending table entries
dba::delete('contact', array('id' => $id));
}
}