Skip to content

Getting Logged User Details

teodorpk edited this page Jun 15, 2018 · 3 revisions

You can get the logged in user details by filtering the user table, by the logged user ID. First you need to create a new server action:

We call it userDetails:

Right click steps:

Select Database Actions:

And add a Database Connection:

Load your database connection:

Then right click database connection step and open Security Provider:

Add security provider:

And load the security provider instance, which you are using for your site:

Right click the security provider step and open security provider:

Then add security restrict. This is to protect our data from unauthorized access:

Now as the protection is set up, let's add a database query. Right click the security restrict step:

Open Database Actions:

And add database query:

Then click the query builder button:

And add the table storing your users details:

Open the conditions tab:

And select the user ID column:

Select equal:

And select the dynamic data picker button, to select a dynamic value:

This dynamic value must be the identity returned by the security provider:

Click select:

And click ok in order to apply query settings:

Save your server action:

Now on your page, in app connect panel add new component:

Open Data:

And select Server Connect:

We call it userdetails (1) and then click the server action button (2):

Select the userDetails server action, and click Select:

Then, on the page - double click where you need to populate some of the users data and select the dynamic data picker:

Under the userdetails server connect, select the data you want to bind and click the select button:

Do the same for every binding you need to insert on the page:

Then, when the user logs in he will see his details:

Clone this wiki locally