template.php check user and profile I created a custom tpl file for one of my content types and I would like to check the users profile as well if they were the publisher and if it all checked out then proceed to the tpl file.

Here is an example

if(publisher and profile){
   proceed to tpl file
}else{
   You are not authorized to view this page.
}


If someone can point me in the right direction that would be great, thanks.
This is not something that should be done in the theme layer. I would look at solutions like ACL or Content Access.

If you really need to code your own solution for some reason, create a custom module and use the necessary hooks, such as hook_permission.