A WordPress-centric search engine for devs and theme authors



set_user_role ›

Since3.6.0
Deprecatedn/a
do_action( 'set_user_role', $this->ID, $role, $old_roles )
Parameters: (3)
  • (int) $user_id The user ID.
    Required: Yes
  • (string) $role The new role.
    Required: Yes
  • (string[]) $old_roles An array of the user's previous roles.
    Required: Yes
Defined at:
Codex:

Fires after the user's role has changed.





Source

do_action( 'set_user_role', $this->ID, $role, $old_roles );