if(isset($node) && $node->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) && $node->type == 'page') {
if($node->uid) {
$node_author = user_load($node->uid);
if(is_object($node_author)) {
if(in_array("editor",$node_author->roles)) {
// This is the condition to match the current node author belongs to editor role.
}
}
}
}