Parameters
- $id
-
(int) ID of the deleted user.
- $reassign
-
(int|null) ID of the user to reassign posts and links to. Default null, for no reassignment.
- $user
-
(WP_User) WP_User object of the deleted user.
The deleted_user action/hook can be used to perform additional actions after a user is deleted. For example, you can delete rows from custom tables created by a plugin.
The hook passes one parameter: the user’s ID.
This hook runs after a user is deleted. The hook delete_user (delete vs deleted) runs before a user is deleted. Choose the appropriate hook for your needs. If you need access to user meta or fields from the user table, use delete_user.
Changelog
Version | Description |
5.5.0 | Added the $user parameter. |
2.9.0 | Introduced. |