wphooks.info - remove_user_role

remove_user_role

The hook occurs in the following file:

wp-includes/class-wp-user.php:
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
		$this->update_user_level_from_caps();

		/**
		 * Fires immediately after a role as been removed from a user.
		 *
		 * @since 4.3.0
		 *
		 * @param int    $user_id The user ID.
		 * @param string $role    The removed role.
		 */
		do_action( 'remove_user_role', $this->ID, $role );
	}

	/**
	 * Set 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.
	 *