[RSS Feed/News] How to properly delete users via PHP?

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
I'm trying to make a small addon to automatically delete users which have not visited in last 2 years.

PHP:

Code:
$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.

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom