drupal - 如何检查用户是否正在访问 drupal 中的特定模块

标签 drupal drupal-6

我在 D6 中有一个 modules 列表。有什么方法可以让我找到 的哪个 module当前用户正在访问。如果我有一个名为X的模块和一个名为Y的函数。如果用户正在使用函数Y > 我可以检查用户是否正在访问 X 模块..??

最佳答案

您可以添加 watchdog调用相关函数。然后在报告页面上监控现场访问。

这是一个例子:

global $user;
watchdog("Access Logging",
         "Access to %func in %file by %user",
         array("%func" => __FUNCTION__,
               "%file" => __FILE__,
               "%user" => $user->name),
         WATCHDOG_NOTICE);

关于drupal - 如何检查用户是否正在访问 drupal 中的特定模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17440286/

相关文章:

Drupal 6 : Why use ! t() 中的标记?

Drupal 7 - 以编程方式向节点添加自由标记

Drupal 功能包括主题

javascript - Drupal 表单无法访问 javascript 函数(错误 "not a function")

php - 在 drupal_goto 之前使用 drupal_add_js

drupal - 通过管理区域选择模板?

mysql - SQL 将作者/故事关系从 Drupal 迁移到 WordPress

drupal - 如何以编程方式将分类术语添加到 hook_nodeapi() 中的节点?

Drupal View : Display recent nodes created by user on profile page

drupal - 如何获取和设置增量值?