# yml 中的 from: & to: 语法钩子

**URL:** <https://meta.discourse.org/t/hooks-from-to-syntax-in-yml-to-disable-anonymous-searches/370952>\
**Category:** Product Support\
**Created:** [2025 年6 月 19 日 21:19 UTC](https://meta.discourse.org/t/hooks-from-to-syntax-in-yml-to-disable-anonymous-searches/370952 "2025-06-19T21:19:09Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

作者： ![opcourdis](https://avatars.discourse-cdn.com/v4/letter/o/45deac/32.png) [@opcourdis](https://meta.discourse.org/u/opcourdis)\
发布日期： [2025 年6 月 21 日 17:04 UTC](https://meta.discourse.org/t/hooks-from-to-syntax-in-yml-to-disable-anonymous-searches/370952/6 "2025-06-21T17:04:56Z")

</div>

我指的是未登录用户，他们会创建一个会话 cookie 来假装已登录，但也许我在这里想得有点多了，因为我猜 currentUser 函数会检查会话密钥。

---

_[View the full topic](https://meta.discourse.org/t/hooks-from-to-syntax-in-yml-to-disable-anonymous-searches/370952)._
