friendica_2021-01/src/Worker/RemoveContact.php
Hypolite Petovan e36f2bb1fb Use short form array syntax everywhere
- Add short form array syntax to po2php.php generation
2018-01-15 14:07:17 -05:00

25 lines
494 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', ['id' => $id]);
if ($r) {
return;
}
// Now we delete all the depending table entries
dba::delete('contact', ['id' => $id]);
}
}