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');
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.