When registering new users such as "email / password", I need to make sure that the user they entered does not yet exist in my real-time database before making a call .createUserWithEmailAndPassword. So I need a request. I need to get a list of everyone displayNamein my thread users. I am confused how to compile this for each userone that is indicated by each auth.uid user.
What would a search look like? I think something like:
firebase.database().ref('users/' + allUserIds).equalTo('Joe');
but I know it is allUserIdsinvalid. Can someone help me with this?
{
"users" : {
"6mJb9vtpbDelyyjirKEf6sSEj8h1" : {
"name" : "asdfs@asdf.com",
"provider" : "password",
"displayName" : "Joe"
},
"T7D7qEOPPHXjKSzglKheGJDQNkE3" : {
"name" : "gfdsdf@hlkjh.com",
"provider" : "password",
"displayName" : "Jane"
},
"kTG9R0V4aXYsogQfgF633KFYtzV2" : {
"name" : "Andre3000",
"provider" : "google.com",
"displayName" : "Andre"
}
}
}
source
share