Search code examples
angularionic-frameworkparse-platformparse-serverback4app

Ionic Framework Login and Get User Information with Parse(Back4app)


Login and Register work perfect as expected but the issue is that I can't retrieve logged in user information as per fields have given on the table.

The link below is what I have done so far:

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

You can access the code for the project on Github:-

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

The application should be able to retrieve or get user information one by one. not all of them in once. Like for example, for now, it must only get or display "Firstname" and "Lastname" only and not display "Id".


Solution

  • For the current logged user, you should do something like this:

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