wphooks.info - add_user_role

add_user_role

(trunk - 5.0-alpha-42177)

The hook occurs in the following file:

wp-includes/class-wp-user.php:
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
		$this->update_user_level_from_caps();

		/**
		 * 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.
		 */
		do_action( 'add_user_role', $this->ID, $role );
	}

	/**
	 * Remove role from user.
	 *
	 * @since 2.0.0
	 *
	 * @param string $role Role name.
	 */