delete_user

delete_user

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7

do_action('delete_user') is found 1 times:

  • /wp-admin/includes/user.php line 380
    	 * @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: