wp_delete_signup_on_user_delete() WordPress Function

The wp_delete_signup_on_user_delete() function allows you to delete a user's signup when the user is deleted. This is useful for when you want to keep your signups clean and tidy.

wp_delete_signup_on_user_delete( int $id, int|null $reassign, WP_User $user ) #

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


Parameters

$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.


Top ↑

Source

File: wp-includes/ms-functions.php

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

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


Top ↑

Changelog

Changelog
VersionDescription
5.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More