I'm trying to make a small addon to automatically delete users which have not visited in last 2 years.
After retrieving users, what would be the right and proper way to delete them? No renaming needed, only delete users like the batch update via ACP would do it.
PHP:
$finder = \XF::finder('XF:User');
$users = $finder->where('last_activity', '<=', time() - 2 * 31556926)->fetch();
After retrieving users, what would be the right and proper way to delete them? No renaming needed, only delete users like the batch update via ACP would do it.