WordPress at a glance
action is not described

set_user_role action-hook . WP 2.9.0

Fires after the user's role has changed.

Usage

add_action( 'set_user_role', 'action_function_name_2647', 10, 3 );
function action_function_name_2647( $user_id, $role, $old_roles ){
	// action...
}
$user_id(int)
The user ID.
$role(string)
The new role.
$old_roles(array)
An array of the user's previous roles.

Notes

  • Since 3.6.0 Added $old_roles to include an array of the user's previous roles.

Where the hook is called

WP_User::set_role()
set_user_role
wp-includes/class-wp-user.php 602
do_action( 'set_user_role', $this->ID, $role, $old_roles );

Where the hook is used (in WP core)

Does not used.