You are here

function private_content_force_uninstall in Private 8.2

@todo Warning, currently cannot uninstall this module due to https://www.drupal.org/node/2282119 Workaround: drush eval "private_content_force_uninstall();"

File

./private_content.module, line 46
A tremendously simple access control module -- it allows users to mark individual nodes as private; users with 'access private content' perms can read these nodes, while others cannot.

Code

function private_content_force_uninstall() {
  $base_table = \Drupal::entityTypeManager()
    ->getDefinition('node')
    ->getDataTable();
  \Drupal::database()
    ->update($base_table)
    ->fields([
    'private' => NULL,
  ])
    ->execute();
  \Drupal::service('module_installer')
    ->uninstall([
    'private_content',
  ]);
}