How can I display the name of the name of I log in account in profile?

I encountered a problem where, upon logging into an account, it should display the name of that account in the profile. Initially, it works correctly, but when I log in with another account, it continues to display the name of the first account I logged into. The name only changes if I create a new account, but afterwards, it doesn't change even when I log in with a different account.

Additionally, I am facing a similar issue with profile pictures. Regardless of whether I log in with another account or create a new one, the profile picture remains the same. It only changes if the user uploads a new picture, but then the new picture is applied to all other accounts as well.

Here's my blocks on my different screen.

Sign Up:

Log In:

Profile:

If you use the same tag to store the data you will have only the last data...you are overwritting the stored data...maybe you can use the username like tag, assuming that username is unique.

Can you show me how? It's really confuse me. I tried all things I know but it's doesn't work.

In log in screen, get the data stored from firebaseBD for the user, store them into TinyDB, and then get if from tinyDB in Profile Screen...the same you are doing when creating a new account.

This one really confuse me. So I need to save it, not "get or load" the saved data? That I've save in tinydb?

How about if the one I want to display is the nickname and not the username.

Where are you getting the data you show in the profile? where is that data stored? In TinyDB in the Tag "UserData", right? and when are you storing data in that Tag? Only when creating a new account? so, you have stored in "UserData" tag only the data of the last account created....regarding the account you are using to login.

So, if you want to have stored in TinyDB, in the Tag "UserData", the information relative to the log in account you need to update it. Where do you have the info of all the accounts? In firebase? then you have to recover, for the log in account, the info from firebase and update tinyDB "UserData" with it.

Hello, I did this and it works but the problem is everytime I login another user it would delete or overwrite the previous user info. What I want it multiple users saved in tinydb then when I log in that user, I can use the other info that been save under that user, like the birthday. Can I do this on tinydb or not?, since I can't see this function in tinydb everytime I search.

You can do it in TinyDB. You have to store the data with a different tag for each user.

Seven days ago we talked about the same....

Here's a TinyDB based sample you can study:

Do I need to user the store value or get value when I log in? When I use the get value function would it still display the name in profile just like when I use the store value?

Thank you I would definitely check this.

You need to store whatever data you want to store, with a unique tag...maybe the username or whatever...then, when log in, get the value stored in tinyDB using the same tag (username).

Then set the labels or whatever with the recovered data of the logged user.