Back

Custom user attributes/properties.

  • 0
  • Users
  • Web
Dennis Ivy
2 Jun, 2023, 22:51

I'm looking to create a user property such as "profile_pic" that would store a url string to the asociated user in file storage. Also want to create a field called "username". I dont see an option for creating custom user properties anywhere. Is this something that's possible or should I just go with creating a "Profile" table and store a reference to the user ID, in a sense creating a one to one relationship.

TL;DR
The user wants to create custom user attributes such as "profile_pic" and "username". They are asking if it is possible to create custom user properties or if they should create a separate "Profile" table with a one-to-one relationship to the user ID. Two workarounds were suggested: using the user preferences object or creating a custom user collection.
Binyamin
2 Jun, 2023, 22:52

There two workarounds you can choose from.

  1. Use the user preferences object.
  2. The more common one is to create a custom user collection. within it add all the custom-made attributes required for the user in your app.
Dennis Ivy
2 Jun, 2023, 22:55

Ok perfect. These where the options I was looking at but I just wanted to make sure I wasn't re-inventing the wheel, thank you πŸ™

Binyamin
2 Jun, 2023, 22:55

πŸ‘

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