创建触发规则时,谁是 cron 更新 drupal 的代理用户?
创建触发规则时,谁是 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这取决于 cron 的触发方式,对于 cron 作业,它将是匿名用户。
It depends on how cron is triggered, for cron jobs, it will be the anonymous user.