Filter: um_rest_userdata

apply_filters( 'um_rest_userdata', $val, $user_id ) → {mixed}

Filters the output data for Rest API userdata call.

Parameters:
Name Type Description
$val mixed

User data value.

$user_id int

User ID.

Since:
  • 2.0
Source:
Returns:

User data value.

Type
mixed
Example

Force change the output data for Rest API userdata call.

function my_custom_um_rest_userdata( $value, $user_id  ) {
    // your code here
    return $response;
}
add_filter( 'um_rest_userdata', 'my_custom_um_rest_userdata', 10, 2 );