Return to Snippet

Revision: 27001
at May 18, 2010 18:14 by doublejosh


Initial Code
<?php
global $user;
$adminRoles= array('dev','editor','employee');
$check = array_intersect($adminRoles, array_values($user->roles));
$adminAble = empty($check) ? FALSE : TRUE;

if($adminAble) {
    print '<p>SHOW THE SPECIAL INFO</p>';
}
?>

Initial URL

                                

Initial Description

                                

Initial Title
Check for admin roles

Initial Tags
drupal

Initial Language
PHP