Back

User preferences

  • 0
  • Users
  • Flutter
  • Web
  • Accounts
tahakhawaja
22 Aug, 2023, 22:32

Is it possible to add user preferences at the time the account.create function is called, or does it need to be updated after the user account is created?

TL;DR
You can create a function and set it to be triggered on the account creation event `users.*.create`. Inside the function, you can access the `APPWRITE_FUNCTION_EVENT_DATA` variable to set the user preferences using the User value. This allows you to add user preferences at the time the account.create function is called.
Binyamin
22 Aug, 2023, 22:47

You can't something to happened with action, but you can make it happened after and action.

Meaning you can create a function and set the function to be triggered on account creation event users.*.create Then, inside the function you can User value which is inside the APPWRITE_FUNCTION_EVENT_DATA variable to set the user preferences.

Check events and functions

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more