um_when_role_is_set

Hook type

Action

Description

Action before user role changed

Parameters

$user_id

(int) User ID

Usage

add_action( 'um_when_role_is_set', 'function_name', 10, 1 );

Examples

<?php
add_action( 'um_when_role_is_set', 'my_when_role_is_set', 10, 1 );
function my_when_role_is_set( $user_id ) {
    // your code here
}
?>

Change Log

Since: 2.0

Source

um_when_role_is_set is located in includes/core/class-roles-capabilities.php::line 140