Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- user_role_revoke_permissions('administrator', [
- 'display eu cookie compliance popup',
- ]);
- function YourModuleName_eu_cookie_compliance_show_popup_alter(&$show_popup) {
- $current_user = Drupal::currentUser();
- $roles = $current_user->getRoles();
- if (in_array('administrator', $roles)) {
- $show_popup = FALSE;
- }
- }
Add Comment
Please, Sign In to add comment