]> git.mxchange.org Git - friendica.git/blob - src/Worker/RemoveContact.php
Missing namespace
[friendica.git] / src / Worker / RemoveContact.php
1 <?php
2 /**
3  * @file src/Worker/RemoveContact.php
4  * @brief Removes orphaned data from deleted contacts
5  */
6 namespace Friendica\Worker;
7
8 use Friendica\Core\Config;
9 use dba;
10
11 class RemoveContact {
12         public static function execute($id) {
13
14                 // Only delete if the contact doesn't exist (anymore)
15                 $r = dba::exists('contact', array('id' => $id));
16                 if ($r) {
17                         return;
18                 }
19
20                 // Now we delete all the depending table entries
21                 dba::delete('contact', array('id' => $id));
22         }
23 }