do_action( 'add_user_role', int $user_id, string $role )

Fires immediately after the user has been given a new role.

Parameters

$user_id

(int) The user ID.

$role

(string) The new role.

Source

File: wp-includes/class-wp-user.php

View on Trac

Changelog

Version Description
4.3.0 Introduced.

© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/add_user_role