WP_REST_Users_Controller::delete_current_item( WP_REST_Request $request ): WP_REST_Response|WP_Error

In this article

Deletes the current user.

Parameters

$requestWP_REST_Requestrequired
Full details about the request.

Return

WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.

Source

public function delete_current_item( $request ) {
	$request['id'] = get_current_user_id();

	return $this->delete_item( $request );
}

Changelog

VersionDescription
4.7.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.