wp_delete_signup_on_user_delete()WP 5.5.0

Deletes an associated signup entry when a user is deleted from the database.

No Hooks.

Return

null. Nothing (null).

Usage

wp_delete_signup_on_user_delete( $id, $reassign, $user );
$id(int) (required)
ID of the user to delete.
$reassign(int|null) (required)
ID of the user to reassign posts and links to.
$user(WP_User) (required)
User object.

Notes

  • Global. wpdb. $wpdb WordPress database abstraction object.

Changelog

Since 5.5.0 Introduced.

wp_delete_signup_on_user_delete() code WP 6.5.3

function wp_delete_signup_on_user_delete( $id, $reassign, $user ) {
	global $wpdb;

	$wpdb->delete( $wpdb->signups, array( 'user_login' => $user->user_login ) );
}