- Issue created by @pascalmortier
- 🇧🇪Belgium pascalmortier
I solved the problem by changing
$is_admin = \Drupal::currentUser()->hasRole('administrator');
to
if(in_array('administrator',$user_roles)) { $is_admin = TRUE; } else { $is_admin = FALSE; }
- 🇵🇹Portugal pedro-alves
Hi pascalmortier,
Please update to version 2.51. The administrator check is not relevant in later versions.
Let us know if that worked for you.