We have a intranet site that runs on Drupal. If an employee hits the site from outside our network they are required to login first. If they are already in our network, they can browse around freely. So we have a function that checks where they are coming from and redirects them to a login page if they are from outside. If we enable caching, they are not redirected because the cached page is rendered without running our function. The code currently exists inside of the theme_preprocess function. Where can I put it so that it always runs before the cached pages are served?
views:
24answers:
1That look's like what I needed. I'll give it a try.
kidbrax
2010-04-28 16:35:11
How do I get this function to run? I have tried phptemplate_boot() in my template.php and I have tried mymodule_boot() in my custom module and neither seem to work.
kidbrax
2010-04-28 17:05:21
nevermind, just found out why it wasn't running: http://www.drupaler.co.uk/blog/bootstrap-and-your-module/88
kidbrax
2010-04-28 17:07:24