wphooks.info - deleted_user

deleted_user

The hook occurs in the following 2 files

wp-admin/includes/ms.php:
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
	$meta = $wpdb->get_col( $wpdb->prepare( "SELECT umeta_id FROM $wpdb->usermeta WHERE user_id = %d", $id ) );
	foreach ( $meta as $mid )
		delete_metadata_by_mid( 'user', $mid );

	$wpdb->delete( $wpdb->users, array( 'ID' => $id ) );

	clean_user_cache( $user );

	/** This action is documented in wp-admin/includes/user.php */
	do_action( 'deleted_user', $id );

	return true;
}

/**
 * Sends an email when a site administrator email address is changed.
 *
 * @since 3.0.0
 *
wp-admin/includes/user.php:
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
	/**
	 * Fires immediately after a user is deleted from the database.
	 *
	 * @since 2.9.0
	 *
	 * @param int      $id       ID of the deleted user.
	 * @param int|null $reassign ID of the user to reassign posts and links to.
	 *                           Default null, for no reassignment.
	 */
	do_action( 'deleted_user', $id, $reassign );

	return true;
}

/**
 * Remove all capabilities from user.
 *
 * @since 2.1.0
 *