How to retrieve another user's info like email and displayName in Firebase? -


i have users node in firebase storing each user's information, but excluding displayname andemail`, in firebase auth db.

one day, realise need user's displayname , email info. example, in page created user, want display user's displayname , email.

by given that

  1. displayname , email not stored under users node,
  2. the user's uniqueid known

is possible retrieve user's displayname , email firebase auth db (by either normal user or admin)? or shall users created in firebase?

thanks, d

with adminsdk possible explained here.

in doc there examples every method, in case guess searched this

admin.auth().getuser(uid)     .then(function(userrecord) {         // see userrecord reference doc contents of userrecord.         console.log("successfully fetched user data:", userrecord.tojson());     })     .catch(function(error) {         console.log("error fetching user data:", error);     }); 

you can things userrecord.displayname. full interface here.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -