Back

Auto Populate with User ID?

  • 0
  • Databases
  • Auth
  • Cloud
danverbs
26 Apr, 2024, 18:15

Super excited that 1.5 is now available for cloud!

Question.. how do I set an attribute to auto populate with the user ID?

Or what’s the easiest way to have that linked?

TL;DR
Developers are wondering about setting attributes to auto-populate with user IDs instead of passing them manually from a web app or other sources. One solution involves creating a function triggered by new user creation to automatically input data into the specified collection. Additionally, the new version 1.5 for cloud services is now available.
Steven
26 Apr, 2024, 18:17

depends on how you're creating the document.

For example, I have a users/profiles collection and a function that triggers when a new user is created. Then, i take that data and create the document in users/profiles collection

danverbs
26 Apr, 2024, 18:52

Just generally I wondered if it could be set as a default value or a trigger rather than having to be passed through as a value from a web app for example

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