Nimrod
Vibe Coder
- Joined
- Jun 1, 2007
- Messages
- 1,497
Digiex Auto Delete Zero-Post Users 1.0.0 - Free XenForo 2.3 Add-on
Why we made this
Like a lot of older boards, Digiex has had its fair share of profile spam. The usual pattern: someone creates an account, gets past the captcha, confirms the email, sticks a website on their profile, then never posts and never comes back. Over time you just end up with a growing pile of empty accounts that do nothing for the place.
We looked for something that would quietly clear that backlog on a schedule. The commercial XenForo add-ons for the same job were around fifty dollars. Felt a bit much for simple housekeeping, so we wrote our own, tuned it the way we want Digiex to run, and are putting it out free for anyone who wants it.
Use it, fork it, strip bits out, rewrite half of it. Whatever you need. No licence fee, no pro version, nothing.
Written with Claude Code
This one was written with Claude Code. The careful parts (dry-run by default, per-run limit, checking real content, the optional tripwire, staff protection) were deliberate.
If you want to change anything later (different rules, more logging, group exemptions, different default age, 2.2 support, whatever), the same approach works fine:
- Open the zip or the add-on folder in Claude Code, Codex or Grok Build
- Tell it in plain English what you want
- Review the changes, run a dry-run first, then switch it live
What it does
Digiex Auto Delete Zero-Post Users is a free XenForo 2.3 add-on that permanently removes long-registered accounts which have never posted. It runs once a day, ships in test mode, and is careful about what it will and will not touch.
Once a day (default 02:00 UTC) it looks for accounts where all of the following are true:
- Registered at least N days ago (default 30)
- Post count is zero (has never posted)
- Not an administrator, moderator, or staff member
Any leftover content (conversations, attachments, reactions etc.) gets reassigned to the usual guest placeholder with the original username kept.
That covers the spam pattern above and ordinary abandoned signups that never came back. It is not a registration spam filter.
It does not stop new signups. It just cleans up accounts that have already failed every “did they ever contribute?” test.
Download:
See the attachment on this post — Digiex-AutoDeleteZeroPosts-1.0.0.zip
Safety features
Why this is not a reckless bulk wipe:
- Test mode on by default — installing the add-on cannot remove anyone. It only logs what would go until you turn test mode off.
- Per-run cap — hard ceiling per night (default 50). A large backlog clears gradually.
- Content re-check before removal — it looks at real post and thread data, not only the stored post-count field (which can be wrong after imports or stale counters).
- Staff always protected — admins, moderators, staff and super-admins are never eligible.
- Optional expected-match tripwire — for a controlled one-off clear-out, set how many accounts you expect. If the count disagrees, the run stops and removes nothing.
- Quiet when healthy — successful live runs stay quiet on purpose. Problems are logged with the prefix [AutoDeleteZeroPosts], so anything you do see is worth reading.
Screenshots
Options page (test mode, age threshold, per-run cap, tripwire, content verify):
Add-on listed as installed:
Requirements
- XenForo 2.3 only (not 2.2)
- PHP 8.0 or newer
- No extra database tables of its own — installs clean, uninstalls clean
Installation
Easiest — Admin CP:
- Admin CP → Add-ons → Install/upgrade from archive
- Upload Digiex-AutoDeleteZeroPosts-1.0.0.zip
- Confirm and let the installer finish
Manual upload:
- Unzip the archive
- Copy the contents of the upload folder into your XenForo root
- Admin CP → Add-ons → Install Auto Delete Zero-Post Users
Command line (optional):
From your XenForo root, use XenForo’s CLI runner (cmd.php) with:
xf:addon-install Digiex/AutoDeleteZeroPosts
After install: nothing is removed until you turn test mode off.Recommended first run
- Install (test mode is already on)
- Admin CP → Options → Auto delete zero-post users — set the minimum account age for your board
- Wait for the nightly job, or run it once from the CLI (below)
- Read the TEST MODE line under Admin CP → Tools → Server error log — it names the accounts it would remove
- Check that list carefully. Long-standing lurkers who only ever read (or only ever used private messages) will appear on it
- When the list looks right, turn Test mode off
Settings
Admin CP → Options → Auto delete zero-post users
- Test mode (dry run) — default On
- Minimum account age — default 30 days
- Maximum removals per run — default 50
- Expected matching users — default −1 (tripwire off)
- Require an exact match — tripwire mode when armed
- Verify against posts and threads before removing — default On (leave it on)
Command line (run without waiting for cron)
From the XenForo root, use the CLI runner with the command name:
digiex-adzp:run
Useful options (each is a normal long option with two leading hyphens):- dry-run — force test mode for this run
- live — force real removal for this run
- expected — override the tripwire count
- limit — override the per-run ca
- min-age — override minimum age in days
- no-guard — disable the tripwire for this run
Important notes before you go live
- XenForo has no soft remove for users. There is no undo. Take a database backup before your first live run.
- Criteria are about posts and threads. Accounts whose only activity is private messages, profile posts, reactions or attachments are eligible. Use test mode and raise the minimum age if that matters on your board.
- Accounts still awaiting email confirmation or moderation are eligible by design — that is where most abandoned and bot registrations sit.
- Cron run rules are evaluated in UTC, and XenForo cron is driven by site traffic, so a quiet board may run a little after the scheduled time.
- Clean live runs write nothing to the error log on purpose. Use test mode (or the CLI) if you want a list of names before committing.
Uninstall
Admin CP → Add-ons → Uninstall, or use the CLI runner with:
xf:addon-uninstall Digiex/AutoDeleteZeroPosts
Removes the cron entry, options and phrases. No custom tables, so nothing is left behind in the database. Accounts already removed are not restored.
Licence
Free for anyone to use, modify, redistribute and build on. No strings. If you improve it for your board, sharing the patch back in this thread would be appreciated but is not required.
Want a different policy? Point Claude Code, Codex or Grok Build at the source and ask. Full documentation is in README.md inside the zip.
Version: 1.0.0 · Digiex · XenForo 2.3 only
Questions and feedback welcome in this thread.
