Skip to content

Configuring Ghost Accounts & Invoice Cleaner

All settings are on the extension's settings page in the admin area (the Extensions list, then edit GhostAccountsCleaner). Changes apply the next time one of the extension's pages is loaded.

A number field that is left empty falls back to its default.

Ghost accounts

Setting Type Default What it does
Default inactivity days Number 90 Number of days without a login that the Likely bot/dead account filter and the Likely Bot/Dead counter require. Values below 1 are treated as 1. It does not change the risk score, which always uses fixed steps of 30, 60 and 90 days.
Minimum bot score Number 60 Risk score from which the Likely Bot column shows a check mark. Values below 1 are treated as 1. It does not affect the Likely bot/dead account filter or the counter.
Protect users with paid invoices Checkbox On Accounts with at least one invoice in status paid cannot be deleted from the Ghost Accounts page.
Protect users with active/suspended services Checkbox On Accounts with at least one service in status active or suspended cannot be deleted from the Ghost Accounts page.
Protect users with open tickets Checkbox On Accounts with at least one ticket in any status other than closed cannot be deleted from the Ghost Accounts page.

Accounts with an admin role are never deleted by the extension. No setting changes that.

Warning

If you switch a protection off, deleting an account also removes what belongs to it. Paymenter's database deletes the user's orders, services, invoices, tickets and credits together with the user. The extension does not cancel or terminate services on your servers before it deletes the account.

Log cleanup

Setting Type Default What it does
Log cleanup: dry run mode Checkbox On While on, the Log Cleaner only counts the rows it would delete. Switch it off to delete.
Auth log retention (days) Number 90 Rows in user_authentication_logs whose last_used_at is at least this many days old are eligible. 0 disables this source.
Activity log retention (days) Number 90 Rows in activity_log whose created_at is at least this many days old are eligible. 0 disables this source.
Failed jobs retention (days) Number 30 Rows in failed_jobs whose failed_at is at least this many days old are eligible. 0 disables this source.

Warning

The Ghost Accounts page reads last logins from user_authentication_logs. If you delete a client's authentication log rows, that client is shown as Never logged in, gets the "Never logged in" signal and its 20 score points, and its inactivity is counted from the registration date. Keep Auth log retention (days) longer than the inactivity period you judge accounts by.

Invoice cleanup

Setting Type Default What it does
Invoice cleanup: dry run mode Checkbox On While on, the Invoice Cleaner shows Preview buttons that only report what would be deleted. Switch it off to get Delete buttons.
Unpaid invoice age threshold (days) Number 90 Invoices created at least this many days ago are listed. Age is measured from the invoice's creation date, not its due date. Values below 1 are treated as 1.
Include draft invoices Checkbox On Lists invoices with status draft.
Include pending/unpaid invoices Checkbox On Lists invoices with status pending or unpaid.
Include cancelled invoices Checkbox Off Lists invoices with status cancelled or canceled.

If all three status checkboxes are off, the Invoice Cleaner lists nothing.

Paymenter's own invoice statuses are pending, paid and cancelled. Invoices with status paid are never listed.

Permissions

The extension registers six permissions. Assign them when you edit a role in the admin area.

Permission Label in the role form What it allows
admin.ghost_accounts.view View Ghost Accounts Cleaner Open the Ghost Accounts page.
admin.ghost_accounts.delete Delete ghost account candidates Use Delete (Safe) and Delete Selected (Safe).
admin.invoice_cleaner.view View Invoice Cleaner Open the Invoice Cleaner page.
admin.invoice_cleaner.delete Delete old unpaid invoices Use the preview and delete actions on the Invoice Cleaner page.
admin.log_cleaner.view View Log Cleaner Open the Log Cleaner page.
admin.log_cleaner.run Run log cleanup Use the preview and clean buttons on the Log Cleaner page.

A role with a delete or run permission but without the matching view permission cannot reach the page.