0

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.

2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.