Delete a user
wp_delete_userDelete a user account. With reassign_to, the user's posts and links pass to that user; without it, WordPress deletes the user's links and entries of post types removed with their author (posts and pages among them; these go to the trash where it is on, the rest is deleted). On multisite the account is only removed from this site, its content handled the same way. Needs delete_users and the right to delete this user; the last administrator is refused. An administrator loses that role first and is deleted after; if the deletion fails, the role is given back and the error says whether that worked; if the account was removed and only a plugin's code after it failed, the answer is deleted with a warning. The call is refused (ab_mcp_busy) while another role change or user deletion runs through AlphaBridge; changes made in wp-admin are not part of these checks. Returns deleted and id. The account deletion is permanent; no undo point is recorded. Forwarded by AlphaBridge Connect to the one site this connection reaches.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Id of the user to delete. | |
| reassign_to | No | Id of the user who inherits the deleted user's content: another existing user of this site, else the call is refused and nothing is deleted. Omitted or 0: WordPress deletes or trashes it as described above. |