X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FWorker%2FRemoveUser.php;h=018d17a46e68e0a415666f2e038395587e8a0128;hb=bf8fb215a9cc554b5ec5b774168a52fb56fa43e6;hp=fb57b1d7c402ff4290c9a15f8aebd3b33d48748f;hpb=af88c2daa34e39cb6430abf64d0648665bfeb9cd;p=friendica.git diff --git a/src/Worker/RemoveUser.php b/src/Worker/RemoveUser.php index fb57b1d7c4..018d17a46e 100644 --- a/src/Worker/RemoveUser.php +++ b/src/Worker/RemoveUser.php @@ -1,13 +1,32 @@ . + * */ + namespace Friendica\Worker; use Friendica\Database\DBA; use Friendica\Model\Item; +/** + * Removes orphaned data from deleted users + */ class RemoveUser { public static function execute($uid) { @@ -22,7 +41,7 @@ class RemoveUser { do { $items = Item::select(['id'], $condition, ['limit' => 100]); while ($item = Item::fetch($items)) { - Item::deleteById($item['id'], PRIORITY_NEGLIGIBLE); + Item::markForDeletionById($item['id'], PRIORITY_NEGLIGIBLE); } DBA::close($items); } while (Item::exists($condition));