I used “app variable user ID” to save the user id but i didn’t use a variable to store the email adress caus when I deleted the convertEmailtold function It also delete the email address.
Can you share your project with me? There are blocks you’re using that I can’t see that are causing the problem with data being stored in the wrong Firebase key.
You still need to have another app variable
to store the email ID so you can use it in other parts of the code.
You mentioned your problem is with the Sign Up block but you provided a copy of the Sign In block. Can you provide a copy of the Sign Up too to compare the two?
What @muneer is saying is that you need to store the Enter your email's Text
block in a variable. Because this…
…will always save to the same key in Firebase. You’ve hard-coded the email address as a text string. You need to replace that with a variable holding the email address because it will be different for each user.
Your Firebase path used to be /profil/[email]/First name. Now you’re using [userid][email]/profil/First name. But in your screenshot way above, you showed your Firebase data starting with profil.
These paths are like turn-by-turn directions to the data… make sure that you path matches your actual Firebase structure.
And if you join the user id and email, you’ll get something like this:
userid: 12345
email a@a.com
joined: 12345a@a.com
when you probably want 12345/a@a.com
So you need to add a “/” between app variable userid
and email
In your blocks you have an extra / between /profil/
and the key such as /password
. You need to remove one of the **/**s.
Another issue is the way you do the blocks in the screen Profil
. You can have all the blocks in the same Starts
event instead of creating multiple Starts
blocks doing the same thing for different labels.
Typically, you would have a users key at the top-level of Firebase. Here’s an example I use in a project:
Above “users” is the database url. When I want to set a value, I would reference users/[app variable user id]/Journal… etc.
What does your top-level look like? What is above “profil” in this screenshot? Where is [app variable userid] supposed to be in your Firebase console?
Your data structure will allow overwriting the data every time you have a new user signing up.
That’s right. There is nothing unique about the paths to your different keys (data). You need to organize it as I’ve shown above with users/[user id]/… so that each user id has it’s own key and path to its data.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.