delete_user

delete_user

Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.0.1

do_action('delete_user') is found 1 times:

  • /wp-admin/includes/user.php line 368
    	 * @param int|null $reassign ID of the user to reassign posts and links to.
    	 *                           Default null, for no reassignment.
    	 * @param WP_User  $user     WP_User object of the user to delete.
    	 */
    	do_action( 'delete_user', $id, $reassign, $user );
    
    	if ( null === $reassign ) {
    		$post_types_to_delete = array();
    		foreach ( get_post_types( array(), 'objects' ) as $post_type ) {
    			if ( $post_type->delete_with_user ) {
    				$post_types_to_delete[] = $post_type->name;
    

See this hook used in plugins: