[development] access control for periodicals - does my plan make sense?

Jeff Eaton jeff at viapositiva.net
Sat Sep 23 18:54:57 UTC 2006


Dave Cohen wrote:
> So my plan is to put some logic in hook_nodeapi.  If $op == 'view', and the 
> user has not subscribed to the node in question, I can do something like:
> 
>     $node->body = t('Sorry, you have to subscribe to view this.');

In Drupal 4.7, the Premium module uses a similar approach. I think 
you'll do pretty well with it. Under Drupal 5.0, it's a little more 
complicated but follows the same basic pattern. Looking at the code for 
Premium.module will definitely give you a good start.

-Jeff



More information about the development mailing list