]> git.mxchange.org Git - friendica.git/blob - src/Worker/RemoveContact.php
Add support for legacy $lang config in App->loadConfig
[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 require_once 'include/dba.php';
12
13 class RemoveContact {
14         public static function execute($id) {
15
16                 // Only delete if the contact doesn't exist (anymore)
17                 $r = dba::exists('contact', ['id' => $id]);
18                 if ($r) {
19                         return;
20                 }
21
22                 // Now we delete all the depending table entries
23                 dba::delete('contact', ['id' => $id]);
24         }
25 }