function fpa_form_user_admin_permissions_alter in Fast Permissions Administration 3.0.x
Same name and namespace in other branches
- 8.2 fpa.module \fpa_form_user_admin_permissions_alter()
- 8.2 fpa.form_alter.inc \fpa_form_user_admin_permissions_alter()
- 7.2 fpa.form_alter.inc \fpa_form_user_admin_permissions_alter()
Implements hook_form_FORM_ID_alter().
File
- ./
fpa.module, line 36 - Main module file for FPA.
Code
function fpa_form_user_admin_permissions_alter(&$form, &$form_state) {
// Prevent duplication of memory limit warning.
$filter_perm_exists = \Drupal::service('module_handler')
->moduleExists('filter_perms');
if ($filter_perm_exists && empty($form_state
->getUserInput())) {
$memory_limit = ini_get('memory_limit');
if (!FPAFormBuilder::checkMemoryLimit()) {
\Drupal::messenger()
->addWarning(t('If you attempt to display all roles and permissions on this page at the same time, you will most likely exceed your PHP memory limit of %memory_limit.', [
'%memory_limit' => $memory_limit,
]));
}
}
}