WordPress at a glance
function is not described

WP_REST_Users_Controller::check_reassign() public WP 4.7.0

Checks for a valid value for the reassign parameter when deleting users.

The value can be an integer, 'false', false, or ''.

{} It's a method of the class: WP_REST_Users_Controller{}

No Hooks.

Return

Int/true/false/WP_Error.

Usage

$WP_REST_Users_Controller = new WP_REST_Users_Controller();
$WP_REST_Users_Controller->check_reassign( $value, $request, $param );
$value(int/true/false) (required)
The value passed to the reassign parameter.
$request(WP_REST_Request) (required)
Full details about the request.
$param(string) (required)
The parameter that is being sanitized.

Changelog

Since 4.7.0 Introduced.

Code of WP_REST_Users_Controller::check_reassign() WP 5.5.2

<?php
public function check_reassign( $value, $request, $param ) {
	if ( is_numeric( $value ) ) {
		return $value;
	}

	if ( empty( $value ) || false === $value || 'false' === $value ) {
		return false;
	}

	return new WP_Error(
		'rest_invalid_param',
		__( 'Invalid user parameter(s).' ),
		array( 'status' => 400 )
	);
}