Action: um_action_user_request_hook

do_action( 'um_action_user_request_hook', $action, $user_id )

Fires to handle 3rd-party user actions from User Profile.

Note: Please verify nonce and redirect after action individually in 3rd-party handler.

Parameters:
Name Type Description
$action string

User action key.

$user_id int

User ID.

Since:
  • 1.3.x
Source:
Example

Update `some_custom_meta` user meta on `my_custom_action`.

function um_action_user_request_hook( $action, $user_id ) {
    if ( 'my_custom_action' === $action ) {
        update_user_meta( $user_id, 'some_custom_meta', true );
    }
}
add_action( 'um_action_user_request_hook', 'um_action_user_request_hook', 10, 2 );