Ionic Framework登录并使用Parse(Back4app)获取用户信息

时间:2019-07-02 20:45:00

标签: angular ionic-framework parse-platform parse-server back4app

登录和注册可以按预期工作,但是问题是我无法按照表中给出的字段检索登录的用户信息。

下面的链接是我到目前为止所做的:

https://www.back4app.com/docs/ionic/ionic-framework-login-screen

您可以在Github上访问该项目的代码:-

https://github.com/back4app/ionic-user-registration

应用程序应该能够一一检索或获取用户信息。并非一次全部。像现在一样,它现在只能只获取或显示“名字”和“姓氏”,而不能显示“ Id”。

1 个答案:

答案 0 :(得分:1)

对于当前登录的用户,您应该执行以下操作:

const currentUser = Parse.User.current();
const firstname = currentUser.get('Firstname');
const lastname = currentUser.get('Lastname');