Posted By

doublejosh on 05/18/10


Tagged

drupal


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

d0ri0
doublejosh


Check for admin roles


 / Published in: PHP
 

  1. <?php
  2. global $user;
  3. $adminRoles= array('dev','editor','employee');
  4. $check = array_intersect($adminRoles, array_values($user->roles));
  5. $adminAble = empty($check) ? FALSE : TRUE;
  6.  
  7. if($adminAble) {
  8. print '<p>SHOW THE SPECIAL INFO</p>';
  9. }
  10. ?>

Report this snippet  

You need to login to post a comment.