What is the best way to write a module that will add some to check if someone is allowed to access a page? I see hook_init doesn't work on cached pages. Do I use moduke_load_include
and does it execute the code first before anything else?
I'm writing a module for Spreedly to work with Commerce 1 (Drupal 7) - technically a payments api that then lets you use and switch between over 100 payments gateways.
Having never done this before, I'm looking for a good (and simple) module to clone and adapt. Do you have any recommendations for which one to choose?