Skip to content

Commit fcb01e6

Browse files
committed
currentUser warning for system messages
1 parent 1fe69ae commit fcb01e6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/5.x/reference/twig/global-variables.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@ The currently-logged-in user, represented by a <craft5:craft\elements\User> obje
179179
{% endif %}
180180
```
181181

182+
::: warning
183+
Some templates are rendered in contexts that don’t use sessions or have any concept of a “current user,” like the command line. [System messages](../../system/mail.md#system-messages) are also somewhat unintuitive in this regard, because the current user may not be the recipient!
184+
:::
185+
182186
### `devMode`
183187

184188
Whether the <config5:devMode> config setting is currently enabled.

0 commit comments

Comments
 (0)