user_role_change_permissions

function user_role_change_permissions

user_role_change_permissions($rid, array $permissions = array())

Change permissions for a user role.

This function may be used to grant and revoke multiple permissions at once. For example, when a form exposes checkboxes to configure permissions for a role, the form submit handler may directly pass the submitted values for the checkboxes form element to this function.

Parameters

mixed $rid: The ID of a user role to alter.

array $permissions: (optional) An associative array, where the key holds the permission name and the value determines whether to grant or revoke that permission. Any value that evaluates to TRUE will cause the permission to be granted. Any value that evaluates to FALSE will cause the permission to be revoked.

    array(
      'administer nodes' => 0,