Files
Filename | Hook Type | Line Number | PHP Doc |
---|---|---|---|
wp-includes/class-wp-user.php | do_action | 563 | /** * Fires immediately after the user has been given a new role. * * @since 4.3.0 * * @param int $user_id The user ID. * @param string $role The new role. */ |
wp-includes/class-wp-user.php | do_action | 638 | /** * Sets the role of the user. * * This will remove the previous roles of the user and assign the user the * new one. You can set the role to an empty string and it will remove all * of the roles from the user. * * @since 2.0.0 * * @param string $role Role name. */ |
Hook Parameters
Parameter Type | Name | Description |
---|---|---|
int | $user_id | The user ID. |
string | $role | The new role. |
int | $user_id | The user ID. |
string | $role | The new role. |