#how can I check if an user exists?

1 messages · Page 1 of 1 (latest)

craggy sentinel
#

Gonna need more info

stray stirrup
#

Im currently working on a react-firebase quiz

#

And I want to know if the user already exists than a specific function should not be executed

#
    if(!user.uid){
    await addDoc(levelRef, {userId: user.uid, username: user.displayName, level: 1} ) 
    }else{
      console.log("ALREADY EXISTS")
    }
  } ```
#

thank you bro

#

I solved the problem😁 🔥