Allow users to delete their accounts from Rest API
-
As it is I can only delete users by providing the Auth token for admin accounts.
This behaviour isn’t compliant with GDPR law, so I’m wondering if I can allow users to delete their own account with the Rest api.
To specify I’d like to be able to make the following request:
DELETE /wp-json/wp/v2/users/<id>?reassign=9&force=true
Using the user’s auth token as Authorization.
I’m aware there’s plugins that some plugins allow this from wp-admin, however I’m unsure if they encompass the api as well.
I’d like a
function.php
solution if that’s possible.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Allow users to delete their accounts from Rest API’ is closed to new replies.