Description
Updates a user’s role.
Parameters
$user_id
(int) (required) The user ID to update.
$role
(string) (required) The role slug.
$action
(string) (optional) The update action (add|remove|set default:set).
Examples
[snippet slug=wpmem_update_user_role lang=php]
Changelog
Introduced in version 3.2.0
Source
wpmem_update_user_role() is located in /inc/api-users.php.