跳转到主要内容
hugozu 提交于 1 July 2011

各位好我的某些页面不希望非注册用户看到,所以就按照http://hellodrupal.info/node/71修改了如下文件:themes/garland/template.php: function phptemplate_preprocess_node(&$vars) { global $user; if (!$user->uid && $vars['node']->nid==2 && $vars['page']) { drupal_set_message(t('Register first')); drupal_access_denied(); }}但是匿名访问还是都能看到。

请问该怎么做才能达到目的?