如何在Firebase中通过UID获取用户的电子邮件 [英] How to get Emails of users via UID in Firebase

查看:48
本文介绍了如何在Firebase中通过UID获取用户的电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试获取数据库中拥有的UID的电子邮件ID,这是给管理员的,以便他们可以查看可用于访问应用程序管理面板的电子邮件ID.

I am trying to get the email IDs of the UIDs I have in DB, this is for the admin so that they may view which email IDs can be used to access an App's Admin panel.

我将如何做到这一点?在SDK文档中的任何地方都找不到与此相关的任何内容.

How will I be able to that? I can't find anything related to this anywhere in the SDK Documentations.

UID是可以通过电子邮件和密码登录的用户.

The UIDs are of users that can login via Email and Password.

推荐答案

为此,您还必须在登录时也将emailId放入数据库中(可以使子节点是每个UID节点的emailId的节点,等等),然后您可以使用简单的侦听器检索它.

For that you have to put the emailId in the database too (can make nodes where child is emailId of each UID node,etc) while login, and then you can retrieve it using simple listeners.

这篇关于如何在Firebase中通过UID获取用户的电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆