delete_user action-hook . WP 2.0.0
Fires immediately before a user is deleted from the database.
Usage
add_action( 'delete_user', 'action_function_name_732', 10, 3 ); function action_function_name_732( $id, $reassign, $user ){ // action... }
- $id(int)
- ID of the user to delete.
- $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 user to delete.
Changelog
Since 2.0.0 | Introduced. |
Since 5.5.0 | Added the $user parameter. |
Where the hook is called
wp-admin/includes/user.php 368
do_action( 'delete_user', $id, $reassign, $user );