<?php
global $user;
// These are the roles who should not see this block
$notallowed = array('anonymous','artist','GoZabo Administrator', 'SuperAdmin');
// Assume they can see it to start
$valid=TRUE;
// Go through each role the user is in and, if we hit a role that is not allowed to see it, set valid to false
foreach($user->roles as $role){
if(in_array($role, $notallowed)) {
$valid=FALSE;
}
}
// If no roles were hit that aren't allowed, this will still be true. Otherwise it will be false.
return $valid;
?>