wp_delete_user ( $id, $reassign = null )
- (int) id User ID.
- (int) reassign Optional. Reassign posts and links to new User ID.
- (bool) True when finished.
- Introduced in WordPress: 2.0.0
- Deprecated in WordPress: —
Remove user and optionally reassign posts and links to another user.If the $reassign parameter is not assigned to a User ID, then all posts will
be deleted of that user. The action Array that is passed the User ID
being deleted will be run after the posts are either reassigned or deleted.
The user meta will also be deleted that are for that User ID.