You are here

function paranoia_form_system_modules_alter in Paranoia 8

Same name and namespace in other branches
  1. 7 paranoia.module \paranoia_form_system_modules_alter()

Implements hook_form_FORM_ID_alter().

Hides Paranoia and PHP modules from module admin form.

File

./paranoia.module, line 70
Disables PHP block visibility permission and gives status error if a role has this permission. Disables the PHP module. Hides the PHP and paranoia modules from the modules page. Prevents user/1 editing which could give access to abitrary contrib…

Code

function paranoia_form_system_modules_alter(&$form, FormStateInterface $form_state) {

  // Invoke custom validation function to disable banned modules on submit.
  $form['#validate'][] = 'paranoia_module_validate';
}