1.20.x user.module user_modules_uninstalled($modules)

Implements hook_modules_uninstalled().

File

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

Code

function user_modules_uninstalled($modules) {
  // Remove permissions provided by a module upon uninstall.
  $removed_permissions = array();
  foreach ($modules as $module_name) {
    if ($module_permissions = module_invoke($module_name, 'permission')) {
      $removed_permissions = array_merge($removed_permissions, array_keys($module_permissions));
    }
  }

  $roles = user_roles();
  foreach ($roles as $role_name => $role_label) {
    user_role_revoke_permissions($role_name, $removed_permissions);
  }
}