function og_role_delete

cis7 og.module og_role_delete($rid)
cle7 og.module og_role_delete($rid)
elmsmedia7 og.module og_role_delete($rid)
icor7 og.module og_role_delete($rid)
meedjum_blog7 og.module og_role_delete($rid)
mooc7 og.module og_role_delete($rid)

Delete a user role from database.

Parameters

$rid: An integer with the role ID.

4 calls to og_role_delete()
OgMigrateUserRoles::postImport in sites/all/modules/ulmus/og/includes/migrate/7200/og_user_roles.migrate.inc
Override Migration::postImport().
og_delete_user_roles_by_group in sites/all/modules/ulmus/og/og.module
Delete all roles belonging to a group.
og_field_delete_instance in sites/all/modules/ulmus/og/og.module
Implements field_delete_instance().
og_ui_admin_roles_submit in sites/all/modules/ulmus/og/og_ui/og_ui.admin.inc
Submit handler; OG roles.

File

sites/all/modules/ulmus/og/og.module, line 2835
Enable users to create and manage groups with roles and permissions.

Code

function og_role_delete($rid) {
  $role = og_role_load($rid);

  db_delete('og_role')->condition('rid', $rid)->execute();
  db_delete('og_role_permission')->condition('rid', $rid)->execute();
  // Update the users who have this role set.
  db_delete('og_users_roles')->condition('rid', $rid)->execute();

  module_invoke_all('og_role_delete', $role);

  og_invalidate_cache();
}
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.