friendica/src/Worker/RemoveContact.php

24 lines
471 B
PHP
Raw Normal View History

2017-11-17 17:16:34 -05:00
<?php
/**
* @file src/Worker/RemoveContact.php
* @brief Removes orphaned data from deleted contacts
*/
namespace Friendica\Worker;
use Friendica\Core\Config;
2017-11-18 00:12:57 -05:00
use dba;
2017-11-17 17:16:34 -05:00
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));
}
}