Description
Fires after the user's role has changed.
Occurrences
Filename | Line Number |
---|---|
wp-includes/class-wp-user.php | 655 |
Parameters
Type | Name | Description |
---|---|---|
int | $user_id | The user ID. |
string | $role | The new role. |
string[] | $old_roles | An array of the user's previous roles. |
PHP Doc
/**
* Fires after the user's role has changed.
*
* @since 2.9.0
* @since 3.6.0 Added $old_roles to include an array of the user's previous roles.
*
* @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.
*/