Posted By

shrop on 07/07/08


Tagged

drupal


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

basicmagic
DanS42
marcoba


Drupal Block Visibility: Check Role


 / Published in: PHP
 

URL: http://www.packtpub.com/drupal-5-themes/book

From Drupal 5 Themes book.

  1. <?php
  2. global $user;
  3. if (in_array('Moderator',$user->roles)) {
  4. return TRUE;
  5. }
  6. else {
  7. return FALSE;
  8. }
  9. ?>

Report this snippet  

You need to login to post a comment.