How to check existed data in firebase?

前端 未结 2 703
被撕碎了的回忆
被撕碎了的回忆 2020-12-22 10:09

I am using firebase database, but I am newbie with it. I am following this tutorial,

Now, my question is how can I check the email if it is already exist in the data

相关标签:
2条回答
  • 2020-12-22 10:22

    Inside ValueEventListener() check email address is exist or not Try this

    if(!dataSnapshot.child("users").child("email").exist)
    

    then insert new value

    0 讨论(0)
  • 2020-12-22 10:29

    If you are trying to create a rule for block user have 2 accounts with same email, you can use the rules inside firebase. There are rules ready for this.

    Authentication -> Method -> botton functions.

    0 讨论(0)
提交回复
热议问题