function user_role_revoke_permissions

cis7 user.module user_role_revoke_permissions($rid, array $permissions = array())
cle7 user.module user_role_revoke_permissions($rid, array $permissions = array())
elmsmedia7 user.module user_role_revoke_permissions($rid, array $permissions = array())
icor7 user.module user_role_revoke_permissions($rid, array $permissions = array())
meedjum_blog7 user.module user_role_revoke_permissions($rid, array $permissions = array())
mooc7 user.module user_role_revoke_permissions($rid, array $permissions = array())

Revoke permissions from a user role.

Parameters

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

$permissions: A list of permission names to revoke.

See also

user_role_change_permissions()

user_role_grant_permissions()

1 call to user_role_revoke_permissions()
user_role_change_permissions in modules/user/user.module
Change permissions for a user role.

File

modules/user/user.module, line 3131
Enables the user registration and login system.

Code

function user_role_revoke_permissions($rid, array $permissions = array()) {
  // Revoke permissions for the role.
  db_delete('role_permission')->condition('rid', $rid)->condition('permission', $permissions, 'IN')->execute();

  // Clear the user access cache.
  drupal_static_reset('user_access');
  drupal_static_reset('user_role_permissions');
}