function paranoia_install in Paranoia 8
Implements hook_install().
File
- ./
paranoia.install, line 13 - Disable risky modules & set install message for Paranoia.
Code
function paranoia_install() {
// Some day it should be possible to remove this require_once. Some day.
require_once dirname(__FILE__) . '/paranoia.module';
$defanger = \Drupal::service('paranoia.defanger');
// Disable the risky modules.
paranoia_remove_disabled_modules();
// Manually remove any enabled risky permissions.
_paranoia_remove_risky_permissions();
\Drupal::messenger()
->addMessage(t('Risky permissions have been automatically disabled.'));
// Unset the admin role.
$defanger
->unsetAdminRole();
}