Guest User

Untitled

a guest
Sep 24th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. user_role_revoke_permissions('administrator', [
  2. 'display eu cookie compliance popup',
  3. ]);
  4.  
  5. function YourModuleName_eu_cookie_compliance_show_popup_alter(&$show_popup) {
  6. $current_user = Drupal::currentUser();
  7. $roles = $current_user->getRoles();
  8. if (in_array('administrator', $roles)) {
  9. $show_popup = FALSE;
  10. }
  11. }
Add Comment
Please, Sign In to add comment