User role fix

Fixes an issue where logic in the extension was dependent on specific Drupal APIs.