hi, if i have a function, and i need to pass the users id who executed it, how can i do that?
To pass the user ID of the person who executed the function, you need the APPWRITE_FUNCTION_USER_ID variable
const userId = res.variables['APPWRITE_FUNCTION_USER_ID']
This variable will automatically contain the user's ID who executed the function.
thank you! is there a documentation for other variables like this aswell?
Recommended threads
- [SOLVED] Realtime Missing Channels
```js useEffect(() => { let subscription: RealtimeSubscription; async function loadChips() { try { const {rows: chi...
- Functions executed by events does not ap...
Hello, Running self-hosted Appwrite version 1.9.0 (with console 7.8.26). When functions are triggered by an event (eg. databases.\*tables.\*.rows.\*.create) doe...
- Updating GitHub App access throws error
Steps to reproduce - 1. Have some private repos allowed on the install access 2. New Site/Func > Connect GitHub > see the side card saying `Missing a repo` > cl...