question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to get data by user id?

See original GitHub issue

Hi!

My database store data like this

/root
    /sheets
        /$user_id
            /some_data

I try to get data from Firebase by current user id. With this solution my app make tons of requests to Firebase.

const wrappedComponent = firebase((params,auth) => {
  let user = auth.auth().currentUser
  return ['/sheets/' + (user!=null?user.uid:"")]
} )(Container)

export default connect(
  ({firebase}) => ({
    sheets: dataToJS(firebase, 'sheets'),
    account: pathToJS(firebase, 'profile')
  })
)(wrappedComponent)

I think I do something wrong 😃 Can you help me?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:30 (15 by maintainers)

github_iconTop GitHub Comments

4reactions
karltaylorcommented, Jul 5, 2017

@Barath-prakash excellent. @prescottprue would you be open to a PR for a “data by user ID example”? Love what you’ve got here!

3reactions
Barath-prakashcommented, Jul 5, 2017

Yes am using angular ionic with firebase… okay So Where will i get solution for my issue…??? @prescottprue

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting data from database based on user id - Stack Overflow
Here's a sample code of how to get the desired user from the data base. $dbUser ...
Read more >
get_userdata() | Function - WordPress Developer Resources
The get_userdata() function returns an object of the user's data. You can echo various parts of the returned object or loop through the...
Read more >
How to get User from the data collection based on the user id
How to get User from the data collection based on the user id · Log In · Forgot Your Password? · Have a...
Read more >
Retrieve Users with the Get Users by ID Endpoint - Auth0
Learn how to retrieve lists of users using the get-users-by-id endpoint.
Read more >
Gets user data by user id | CollabNet | Postman API Network
Gets alternative license types by userid. GET. Gets authorization keys ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found