Action hook 'delete_user'

in WP Core File wp-admin/includes/user.php at line 380

Description

Fires immediately before a user is deleted from the site. Note that on a Multisite installation the user only gets removed from the site and does not get deleted from the database.

Occurrences

Filename Line Number
wp-admin/includes/user.php 380

Parameters

Type Name Description
int $id ID of the user to delete.
int|null $reassign ID of the user to reassign posts and links to. Default null, for no reassignment.
WP_User $user WP_User object of the user to delete.

PHP Doc

/**
	 * Fires immediately before a user is deleted from the site.
	 *
	 * Note that on a Multisite installation the user only gets removed from the site
	 * and does not get deleted from the database.
	 *
	 * @since 2.0.0
	 * @since 5.5.0 Added the `$user` parameter.
	 *
	 * @param int      $id       ID of the user to delete.
	 * @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.
	 */