]> git.mxchange.org Git - friendica.git/blob - include/remove_contact.php
Issue 3857: There is the possibility of a bad handling of dislikes
[friendica.git] / include / remove_contact.php
1 <?php
2 /**
3  * @file include/remove_contact.php
4  * @brief Removes orphaned data from deleted contacts
5  */
6
7 use Friendica\Core\Config;
8
9 function remove_contact_run($argv, $argc) {
10         if ($argc != 2) {
11                 return;
12         }
13
14         $id = intval($argv[1]);
15
16         // Only delete if the contact doesn't exist (anymore)
17         $r = dba::exists('contact', array('id' => $id));
18         if ($r) {
19                 return;
20         }
21
22         // Now we delete all the depending table entries
23         dba::delete('contact', array('id' => $id));
24 }