Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author cmc3215

    (@cmc3215)

    Thanks for your question and sorry for the late response, for some reason I never got the usual email for a new support post.

    What you’re asking is not possible out of the box, I use a nonce in the URL to help prevent an unexpected deletion from a simple URL.

    However, it is possible if you can place some PHP in your confirmation form to generate your own “Delete Me” URL.

    You just need the following two variables present in any URL within your WordPress site:

    plugin_delete_me = get_current_user_id()
    plugin_delete_me_nonce = wp_create_nonce( ‘plugin_delete_me_nonce’ )

    So the URL might look like this:

    https://example.com/wp-admin/example-page.php?plugin_delete_me=100&plugin_delete_me_nonce=10f9179b33

    And of course, the user’s role must have been checked on the “Delete Me Settings” page to provide permission to delete.

    Thread Starter tomicakorac

    (@tomicakorac)

    Hi cmc3215, thanks for getting back to me. I finally ended up using the wp_delete_user() function which appeared to be enough for the job requirement. I’ll mark this topic as resolved.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to get the 'delete me' url?’ is closed to new replies.