set_user_role

set_user_role

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7

do_action('set_user_role') is found 1 times:

  • /wp-includes/class-wp-user.php line 655
    		 * @param int      $user_id   The user ID.
    		 * @param string   $role      The new role.
    		 * @param string[] $old_roles An array of the user's previous roles.
    		 */
    		do_action( 'set_user_role', $this->ID, $role, $old_roles );
    	}
    
    	/**
    	 * Chooses the maximum level the user has.
    	 *
    	 * Will compare the level from the $item parameter against the $max
    

See this hook used in plugins: