Main menu

Drupal IF in a role, but not other roles

01 Aug
Published by Mark W. Breneman


$roles =content_access_get_per_node_settings($node);
if (in_array(4,$roles['view']) and !in_array(1,$roles['view']) and !in_array(2,$roles['view'])){return true;}
?>

Category 

Drupal

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.