How can I store session in my app?

0
I have a login page that I have created by my own(not using mendix security login). I need to show the data entered by logged in person on basis of his email id, in home page. Also, I need to show some of his details like email, contact number and image in home page. How can I achieve this? Is there any way to store email id in session in Mendix?
asked
3 answers
0

Hi Jibin,

  If you are using the Mendix Authentication module to do your logging in, then the Mendix Runtime automatically creates a handful of objects that can be used in data retrieves.  The runtime handles session creation and destruction automatically. In the case you are describing, the simplest thing to do is retrieve the 'Account' entity in a data view using a Microflow.  Retrieve the first Account using the XPath:

  id = ['%CurrentUser%']

  The platform will ensure that the data retrieved is related to the person who is currently logged in.  You can use the Account entity to retrieve other data over association to ensure it is related only to your current user.

  To learn more, I recommend you check out the Mendix online training, especially this module, as a starting point:

https://gettingstarted.mendixcloud.com/link/module/123/

  What do you mean that you are not using Mendix Security Login?  Have you built your own login page using the Mendix authentication widgets, or are you skipping the Administration module all together? 

answered
0

Hello Jibin,

The easiest path is to add those as attributes to your Account entity given that all your users would be created as accounts you can add over there the required details.

As for displaying you can run a microflow to get the account with an id that equals the current user, that way you can get the user's account and display the respective attributes.

Hope this helps 

answered
0

App Store Connect is constantly evolving to improve the experience of managing and deploying your app on App Store. Learn about the new App Store Connect API for managing frequently modified data such as users and groups, see the latest updates to Sales Trends and Analytics reporting, and TestFlight features enhanced to help you test and deploy your next masterpiece. Plex    Lucky Patcher   Kodi

answered