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.
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.
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.
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.
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?
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.