创建触发规则时,谁是 cron 更新 drupal 的代理用户?

发布于 2024-09-12 00:06:15 字数 241 浏览 0 评论 0原文

创建触发规则时,谁是 cron 更新 drupal 的代理用户?我指的是开发人员在“添加条件”小部件中使用自定义 php 代码选项时可用的 php 变量。代理用户是否应该是 cron 运行时登录的任何人?或者这必须是导航到 cron.php 的人?我问的原因是我想使用 cron 来启动一个 sql 查询,看看有人是否满足获得我为像 SO 这样的网站创建的特定徽章的要求。我知道我可以只使用查看内容事件,但由于每次有人查看节点时都会触发该事件,因此我试图避免这种情况。

Who is the acting user for cron updates drupal when creating a triggered rule? What I'm referring to is the php variable available to the developer when using the custom php code option in the "add a condition" widget. Is the acting user supposed to be anyone who is logged in at the time the cron runs? Or does this have to be someone who navigates to cron.php? The reason I'm asking is that I want to use the cron to kick off a sql query that looks to see if someone meets the requirements to earn a certain badge I've created for a site like SO. I know I could just use the view content event, but since that fires every time someone views a node, I'm trying to avoid that.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

十二 2024-09-19 00:06:15

这取决于 cron 的触发方式,对于 cron 作业,它将是匿名用户。

It depends on how cron is triggered, for cron jobs, it will be the anonymous user.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文