Back

[CLOSED] i have to use user id and user mobile no from auth in almost all call in appwrite database

  • 0
  • Android
Shubham
13 Aug, 2023, 12:09

how will i get this very easily or we need to wait for account.get() and after completing this request i will call any database by passing user id and mobile no?

TL;DR
Solution: The question is more related to the application's data fetching design rather than Appwrite specifically. One solution is to use the `account.get()` function at the start of the UX lifecycle to retrieve the required user data from Auth. You can then store this data in a cache or local variable to reference whenever needed. Another option is to call `account.get()` whenever you need the user data, as it doesn't take much time.
safwan
13 Aug, 2023, 12:39

this isn't really related to appwrite. this is a question more specific to your application's data fetching design i suppose.

regardless, you can simply do account.get() at the start of the UX lifecycle, and store the required data in a cache or a local variable that you can reference whenever needed.

a function like account.get() doesn't take a lot of time, so you could just use account.get() whenever you need as well.

Shubham
13 Aug, 2023, 12:45

ok

safwan
13 Aug, 2023, 12:46

[CLOSED] i have to use user id and user mobile no from auth in almost all call in appwrite database

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