Description
FonX Delete User turns account erasure into a controlled, reviewed process instead of a one-click auto-delete.
Most “delete my account” plugins force visitors into their own button or form. FonX Delete User takes the opposite approach: you keep the form you already have and the plugin quietly powers it in whichever way fits your site.
What makes it different
- Bring-your-own-form — integrate any existing HTML form on your site with a CSS selector and data-fxldu-field mapping. The form you styled stays the form your visitors see; the plugin’s JavaScript attaches to it without blocking its own handler.
- Config-only mode — toggle the plugin’s own markup off entirely. The shortcode or block still emits the per-site request token and configuration, so an existing form can drive submissions with nothing extra rendered.
- Admin approval pipeline — nothing is deleted automatically. Every request waits in the admin queue for you to approve, reject, or delete it.
- External API mode — instead of deleting inside WordPress, forward erasure submissions to your own endpoint for the external system to complete.
- Audit logging — every request and outcome is recorded in the database or a file, with a built-in viewer.
Features
- Dual deletion modes — store requests pending admin approval (wordpress_db) or forward submissions immediately to an external endpoint (external_api).
- Form builder — add text, email, password, textarea, checkbox, select, and hidden fields with required toggles, placeholders, options, and validation regexes.
- Flexible injection — the [fxldu_form] shortcode, a native Gutenberg block, or integration with an existing page form via CSS selector and data-* field mapping.
- Email notifications — alert the administrator (or a custom admin email) about new requests, and acknowledge the requester by email with configurable subject/body and placeholders.
- Security hardening — honeypot anti-bot field, per-site HMAC-compatible request tokens, per-IP rate limiting, capability-gated admin endpoints, prepared SQL, and fully escaped output.
Submission flow
- A visitor submits the form (shortcode, block, or an integrated existing form).
- The frontend checks the honeypot, validates required fields, and posts a JSON request containing a per-site token, the user email, and the collected fields.
- The request is stored with status pending (rate-limited per IP).
- The administrator is notified; the requester can also receive an acknowledgement email.
- On approval, the user is permanently deleted via wp_delete_user() (WordPress Database mode) or the request is marked approved for the external system (External API mode). On rejection, the request is marked rejected and no deletion happens.
- The requester is notified of the outcome.
Additional Information
This release addresses the points raised during the plugin review and hardens two runtime paths found while testing. Details of what changed and why:
- Global prefix — every global identifier now uses the unique
fxlduprefix instead of the genericdu_/delete_user_names: option keys, database tables, transients, the REST namespace (fxldu/v1), action/filter names, nonces, admin menu slugs, the[fxldu_form]shortcode, thefxldu/formblock, enqueue handles, JavaScript globals, and frontend CSS classes. PHP constants areFXLDU_*and the class namespace isFxldu\. The text domainfonx-delete-userand the plugin folder name are unchanged. - Database cleanup — the admin list tables (Fields, Requests, Logs) and the REST listing endpoint no longer pass an empty argument list to
$wpdb->prepare()when no filter or search is applied; in that case the static count query runs directly instead of emitting the “the query argument must have a placeholder” notice. - Existing-form integration — when the integration selector matches a non-form container (some themes wrap their form in a div that is matched instead of the
<form>itself), field collection and email resolution now read the named inputs directly instead of throwing insidenew FormData(). The window integration-guard is__fxlduIntegrationBound. - Script output — the frontend form configuration is no longer printed as raw inline
<script>tags. The shortcode and block register thefxldu-frontendscript throughwp_enqueue_script()and inject the config object withwp_add_inline_script( 'fxldu-frontend', $js, 'before' ). The unusedprint_frontend_config()method was removed from the main plugin file, and no<script>or<style>strings remain in the plugin source. - Sanitization of custom headers — the admin live-test of the API connection now passes the custom headers through
sanitize_textarea_field( wp_unslash( $_POST['api_headers'] ) )before building the request, matching the sanitization applied when the headers are saved. - Contributors — the
Contributors:header now uses the plugin owner’s WordPress.org username. - Log file location — file logging no longer writes to a hard-coded
WP_CONTENT_DIRpath. Logs now go to a plugin-specific subfolder under the uploads directory ({uploads}/fxldu/fxldu-logs.log), created withwp_mkdir_p(), and each line is appended witherror_log( $line, 3, $log_path ). - External-request REST proxy — the
/external-requestroute remains open for anonymous form submissions but is now hardened: it keeps the honeypot check and the per-site token verification, strips internal keys from the forwarded payload, fails closed with HTTP 403 unless External API mode is active, and is rate-limited per IP (its own transient counter so a normal submission still counts only once per endpoint leg). - Uninstall cleanup — the broad
option_name LIKEquery (which could delete options owned by other plugins sharing the old prefix) and a usermetaLIKEcleanup (the plugin writes no user meta) were removed.uninstall.phpnow deletes an explicit list of the 26 options owned by this plugin plus the three plugin-owned database tables. - Rate-limit filter — the
fxldu_rate_limitfilter documented in the FAQ is now actually applied. Both the/requestand/external-requestendpoints enforce their per-IP limit through a shared helper whose default ismax( 1, Options::get_rate_limit() )and which honorsapply_filters( 'fxldu_rate_limit', $limit, $ip ).
Screenshots









Blocks
This plugin provides 1 block.
- Delete User Form Renders the configurable account deletion form.
Installation
- Upload the fonx-delete-user folder to /wp-content/plugins/.
- Activate the plugin through the Plugins screen.
- Activation creates three database tables — {prefix}fxldu_fields, {prefix}fxldu_requests, and {prefix}fxldu_logs — and seeds the default options.
- Configure it under FonX Delete User Settings, then add fields under Fields.
FAQ
-
How do I put the form on a page?
-
Use the [fxldu_form] shortcode anywhere in post content or a widget, or insert the Delete User Form block in the block editor. Both render server-side, so they always reflect your current fields and settings.
-
How do I use my own existing form instead of the plugin’s form?
-
Enable Integration under Settings, set the CSS selector for your form, and add data-fxldu-field attributes to the inputs you want mapped. Keep the shortcode or block on the same page (it supplies the request token and configuration) and, if you do not want the plugin’s form visible, uncheck Show Form in the Form settings tab — only the configuration script is emitted.
-
How is the user identified?
-
The plugin resolves the submitter by email. Add an email-type field to the form (or name a field user_email or email). Requests without a valid email are rejected.
-
What happens to the user’s account?
-
In WordPress Database mode the account is deleted only after an administrator approves the pending request. In External API mode the submission is forwarded to your endpoint immediately, and the external system is responsible for erasure.
-
How does the plugin stop spam?
-
A hidden honeypot field silently discards automated submissions, every request must carry a valid per-site token, and each IP is rate-limited (default 5 requests/hour). The limit is adjustable via the fxldu_rate_limit filter.
-
What emails does the plugin send?
-
The administrator receives a new-request alert (to the admin email configured in the Email settings tab, falling back to the site admin email). The requester can receive an acknowledgement email on submission and is notified on approval, rejection, and completion. Subject and body for the acknowledgement are configurable and support {{site_name}}, {{user_email}}, and {{request_id}}.
-
Is there an API?
-
Yes. POST /wp-json/fxldu/v1/request accepts deletion requests (public, token-verified). Administrators can use GET /wp-json/fxldu/v1/requests, POST /requests/{id}/approve, and POST /requests/{id}/reject.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“FonX Delete User” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “FonX Delete User” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.1.0
- Renamed every global prefix to the unique
fxlduprefix to prevent conflicts with other plugins: option keys, database tables, transients, the REST namespace (fxldu/v1), action/filter names, nonces, the admin menu slugs, the[fxldu_form]shortcode, thefxldu/formblock, enqueue handles, JavaScript globals, and frontend CSS classes. - PHP constants are now
FXLDU_*and the class namespace isFxldu\. - Fixed a “wpdb::prepare was called incorrectly” notice on the Fields, Requests, and Logs admin pages and on the REST listing endpoint when no filter or search is applied — count queries without placeholders no longer go through prepare().
- Existing-form integration now tolerates a non-form container as the integration target (e.g. a theme wrapper div): field collection and email resolution read the named inputs directly instead of failing inside new FormData().
1.0.4
- Frontend configuration is now output through the script loader (wp_add_inline_script) instead of raw inline script tags.
- Custom API headers are sanitized before test-connection and outbound requests.
- The external-request REST proxy is only active in External API mode and is rate-limited per IP.
- Implemented the documented fxldu_rate_limit filter for adjusting the per-IP request limit.
- File logs now write to the uploads directory (a plugin-specific subfolder) instead of wp-content.
- Uninstall removes only this plugin’s own options, not any option whose name contains “fxldu_”.
- Corrected the Contributors list to the plugin owner’s WordPress.org username.
1.0.3
- Renamed the admin page title from “Deletion Requests” to “Delete Requests”.
- Added a status filter dropdown (All Statuses / Pending / Completed / Rejected) with a Filter button to the requests list table.
1.0.2
- External API submissions now record server-side and prefer the plugin’s own success message.
- Added a Show Form option so the shortcode/block can emit configuration only (for existing-form integration).
- Added an Email settings tab for the admin recipient and a configurable requester acknowledgement email.
- Frontend success/error messages now always come from the General settings.
1.0.1
- Fixed double rendering on the settings page.
- Fixed stale JavaScript state on the settings page.
- Improved external API request handling and success-message fallbacks.
1.0.0
- Initial release: dual deletion modes, form builder, shortcode and block injection, existing-form integration, admin review pipeline, audit logging, email notifications, and guest-form security.
