Check that a user is an administrator in Drupal

Uncategorized

You can check that a user is an administrator or not like this:

if(user_access('administer'))
  echo 'I am an admin';
else
  echo 'I am not an admin';

Leave a Reply

Your email address will not be published. Required fields are marked *