how to fetch data in firebase by user id [closed]Adding Mobile Number based login mechanism for auth user in firebaseAndroid Firebase realtime database not workingHow to retrieve data and specific user data from the FirebaseFirebase email authentication add username and details to firebase databaseAndroid Firebase .Adding data to specific users Firebase databaseHow to send data from Firebase storage to an email address?Ensuring third party cannot read data in our Firebase Realtime DatabaseIdentify firebase auth and database query timeout in react nativeHow to add child to a List in Firebase Realtime Database with a cloud function?How to stop multiple Firebase events callback on(Value,snapshot)

What happens if you roll doubles 3 times then land on "Go to jail?"

How to be diplomatic in refusing to write code that breaches the privacy of our users

Can the discrete variable be a negative number?

How do I go from 300 unfinished/half written blog posts, to published posts?

How does the UK government determine the size of a mandate?

Purchasing a ticket for someone else in another country?

Customer Requests (Sometimes) Drive Me Bonkers!

Applicability of Single Responsibility Principle

India just shot down a satellite from the ground. At what altitude range is the resulting debris field?

Why are there no referendums in the US?

Is there a korbon needed for conversion?

Do the temporary hit points from the Battlerager barbarian's Reckless Abandon stack if I make multiple attacks on my turn?

What is the opposite of 'gravitas'?

Do sorcerers' Subtle Spells require a skill check to be unseen?

Is there a good way to store credentials outside of a password manager?

Sequence of Tenses: Translating the subjunctive

Implement the Thanos sorting algorithm

Unreliable Magic - Is it worth it?

What does 算不上 mean in 算不上太美好的日子?

How does buying out courses with grant money work?

What is the best translation for "slot" in the context of multiplayer video games?

Failed to fetch jessie backports repository

Escape a backup date in a file name

Would this custom Sorcerer variant that can only learn any verbal-component-only spell be unbalanced?



how to fetch data in firebase by user id [closed]


Adding Mobile Number based login mechanism for auth user in firebaseAndroid Firebase realtime database not workingHow to retrieve data and specific user data from the FirebaseFirebase email authentication add username and details to firebase databaseAndroid Firebase .Adding data to specific users Firebase databaseHow to send data from Firebase storage to an email address?Ensuring third party cannot read data in our Firebase Realtime DatabaseIdentify firebase auth and database query timeout in react nativeHow to add child to a List in Firebase Realtime Database with a cloud function?How to stop multiple Firebase events callback on(Value,snapshot)













-1















I have users inserted into firebase database , every user with his own data (email, name , age ....), I try to get data of a single user - the connected device's user - my function is bringing data but its bringing the entire database , all users , could you please help to solve the issue ,
here is my code :



componentWillMount()
firebase.auth().onAuthStateChanged((user) =>
if (user)
firebase.database().ref('friends')
.on('value', (snapshot) => );

);










share|improve this question









New contributor




hMedia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











closed as unclear what you're asking by Doug Stevenson, André Kool, Andrew, Sinto, AkshayNevrekar Mar 22 at 4:57


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.






















    -1















    I have users inserted into firebase database , every user with his own data (email, name , age ....), I try to get data of a single user - the connected device's user - my function is bringing data but its bringing the entire database , all users , could you please help to solve the issue ,
    here is my code :



    componentWillMount()
    firebase.auth().onAuthStateChanged((user) =>
    if (user)
    firebase.database().ref('friends')
    .on('value', (snapshot) => );

    );










    share|improve this question









    New contributor




    hMedia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.











    closed as unclear what you're asking by Doug Stevenson, André Kool, Andrew, Sinto, AkshayNevrekar Mar 22 at 4:57


    Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.




















      -1












      -1








      -1








      I have users inserted into firebase database , every user with his own data (email, name , age ....), I try to get data of a single user - the connected device's user - my function is bringing data but its bringing the entire database , all users , could you please help to solve the issue ,
      here is my code :



      componentWillMount()
      firebase.auth().onAuthStateChanged((user) =>
      if (user)
      firebase.database().ref('friends')
      .on('value', (snapshot) => );

      );










      share|improve this question









      New contributor




      hMedia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I have users inserted into firebase database , every user with his own data (email, name , age ....), I try to get data of a single user - the connected device's user - my function is bringing data but its bringing the entire database , all users , could you please help to solve the issue ,
      here is my code :



      componentWillMount()
      firebase.auth().onAuthStateChanged((user) =>
      if (user)
      firebase.database().ref('friends')
      .on('value', (snapshot) => );

      );







      firebase react-native firebase-realtime-database firebase-authentication






      share|improve this question









      New contributor




      hMedia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      hMedia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited Mar 21 at 15:55









      Doug Stevenson

      82.6k1099117




      82.6k1099117






      New contributor




      hMedia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked Mar 21 at 15:53









      hMediahMedia

      13




      13




      New contributor




      hMedia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      hMedia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      hMedia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




      closed as unclear what you're asking by Doug Stevenson, André Kool, Andrew, Sinto, AkshayNevrekar Mar 22 at 4:57


      Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.









      closed as unclear what you're asking by Doug Stevenson, André Kool, Andrew, Sinto, AkshayNevrekar Mar 22 at 4:57


      Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
























          1 Answer
          1






          active

          oldest

          votes


















          0














          If you have not already, you need to split the information regarding each user into subcollections.



          For example: friends > user_1 > email, name, age......



          Then in your Firebase query you need to specify the subcollection. Right now you have it returning every entry under 'friends'. It should look something like this:



          componentWillMount()
          firebase.auth().onAuthStateChanged((user) =>
          if (user)
          firebase.database().ref('friends/' + user.uid) //reference uid of logged in user like so
          .on('value', (snapshot) => );

          );






          share|improve this answer





























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            If you have not already, you need to split the information regarding each user into subcollections.



            For example: friends > user_1 > email, name, age......



            Then in your Firebase query you need to specify the subcollection. Right now you have it returning every entry under 'friends'. It should look something like this:



            componentWillMount()
            firebase.auth().onAuthStateChanged((user) =>
            if (user)
            firebase.database().ref('friends/' + user.uid) //reference uid of logged in user like so
            .on('value', (snapshot) => );

            );






            share|improve this answer



























              0














              If you have not already, you need to split the information regarding each user into subcollections.



              For example: friends > user_1 > email, name, age......



              Then in your Firebase query you need to specify the subcollection. Right now you have it returning every entry under 'friends'. It should look something like this:



              componentWillMount()
              firebase.auth().onAuthStateChanged((user) =>
              if (user)
              firebase.database().ref('friends/' + user.uid) //reference uid of logged in user like so
              .on('value', (snapshot) => );

              );






              share|improve this answer

























                0












                0








                0







                If you have not already, you need to split the information regarding each user into subcollections.



                For example: friends > user_1 > email, name, age......



                Then in your Firebase query you need to specify the subcollection. Right now you have it returning every entry under 'friends'. It should look something like this:



                componentWillMount()
                firebase.auth().onAuthStateChanged((user) =>
                if (user)
                firebase.database().ref('friends/' + user.uid) //reference uid of logged in user like so
                .on('value', (snapshot) => );

                );






                share|improve this answer













                If you have not already, you need to split the information regarding each user into subcollections.



                For example: friends > user_1 > email, name, age......



                Then in your Firebase query you need to specify the subcollection. Right now you have it returning every entry under 'friends'. It should look something like this:



                componentWillMount()
                firebase.auth().onAuthStateChanged((user) =>
                if (user)
                firebase.database().ref('friends/' + user.uid) //reference uid of logged in user like so
                .on('value', (snapshot) => );

                );







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 21 at 17:31









                Troy MyersTroy Myers

                227213




                227213















                    Popular posts from this blog

                    Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                    SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

                    은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현