apply condition to pages created by user roles if(isset($node) &amp;&amp; $node-&gt;type == 'page') { 
}


In the above code, I need add one more condition, so that it get applied on those pages which was created by users having user role "EDITOR" Please help.
if(isset($node) &amp;&amp; $node-&gt;type == 'page') {
  if($node-&gt;uid) {
    $node_author = user_load($node-&gt;uid);
    if(is_object($node_author)) {
      if(in_array("editor",$node_author-&gt;roles)) {
        // This is the condition to match the current node author belongs to editor role.
      }
    }
  }
}