Hello i am making a logout button on my app

hello i am making a logout button on my app.
the problem is when i select image for the profile image and logout the current account and if i login another account the image profile is still the image from the other account that i already logout.can somebody help me
?

Welcome to the forum, see the following topic

How to ask a question? Community

Asking questions To improve the chance of getting help on the forum please follow these recommendations when posting a question: Do your homework first Search for similar questions/answers on the forum. Try forum search and also Google your problem. Try to solve the problem yourself, and describe what you have tried. It is much more rewarding to help someone who has tried himself first. Post in the right categorie, post only once and do not steal topics Make sure that you post your question …

You have only mentioned your problem. But posted no blocks and/or screenshots to help us understand the problem.

Im sorry this is my blocks

Hello,

1st, instead of empty tags, you may want to call it profile or picture.
2nd, I don’t see any block storing the image in Firebase, only on the phone.
3rd, you did not show the logout button to see what is missing in it.
4th, I see you calling Firebase to get value for an image but you only have one tag name but no other if statement if it’s the image.

Hello This is all the blocks thank you for your consideration

Hello,
The user image (profile), do you also store it online ,

hello i change my block and still wen i logout my account and login another account the profile image is still the other account witch is already logout.do you have a tutorial for this problem?

As I can see, you’re storing Profile Image in TinyDB. And, when user clicking on Logout, it still remains in TinyDB. That’s why you see the same image even after Logging out .
Simply clear the image from TinyDB on Logout.

1 Like

what shod i do?

tank you

Clear that ProfileImage tag on Logout button click… Then it should work fine…

thank you very much this is working fine but i expecting when i login the previous account it must be sowing the image for that previous account and if i login another account the profile image of that account must be sowing on the image profile…

That is depending on how and from where you’re calling those data…

thank you very much. if you have a sample of clock would you mind if i request some sample of block for this problem??

Unfortunately I don’t have sample blocks ready.

Use Cloudinary to store the image online and get an URL. When the user login, you call the database and get that URL to show image. When log out, just clear it on the phone (It will still be available online) and so on.