How to show logged user details on the page?

Followed Getting Details of the Logged In User and Binding them to your page but can not get the user data to show up in the page.

What do you have in your security restrict as options?

When you are checking make sure that you are logged in.

Security restrict is empty (all logged in users)

I have to log in to check it. Login works just fine

@web-works so did you make this work, as it’s not really clear from your replies?

No Teodor, I could not get it to work. I was just waiting for more replies. :cold_sweat:

Ok, can you explain which part of the tutorial is not working and what have you done on the page and in the server action?

I want to show the username on the page and as a hidden field on an insert form.
Followed the full tutorial, I get no errors, but it will not show.
It must be my lack of logic.
The login at redirects to “artikelen.php”.
You can login with:
Username: Teodor
Password: wappler2019

The page says: Welkom terug (Welcome Back) username {{[0].username}}

But no username displays.

Server Action Steps:
Dbase connection
Security provider: siteSecurity
Security Restrict: siteSecurity > Permissions empty
Dbase Query: Table: Users > conditions: users.id_user equal {{siteSecurity.identity}}

The following tutoial is really useful for finding the problems:

Which in your case is the user details server action, which returns errors:

<br />
<b>Fatal error</b>:  Call to a member function restrict() on null in <b>/usr/home/</b> on line <b>64</b><br />
<br />
<b>Fatal error</b>:  Uncaught exception 'ErrorException' with message 'Cannot modify header information - headers already sent by (output started at /usr/home/' in /usr/home/
Stack trace:
#0 [internal function]: exception_error_handler(2, 'Cannot modify h...', '/usr/home/makku...', 43, Array)
#1 /usr/home/ header('HTTP/1.1 500 In...')
#2 [internal function]: fatal_handler()
#3 {main}
  thrown in <b>/usr/home/</b> on line <b>43</b><br />

Please provide a screenshot of your server action steps for the user detail actions.

What have you selected in the security restrict exactly?

Remove the restrict step, save the server action and test your page.
Then add this step again and save your server action again.

Also, please check how is your query filtered, as this could also be an issue … if the filter is not properly applied. And check the security provider step as well.
There is really nothing too complex here, if you just follow my tutorial.

Haha, I followed your tutorial to the letter for about 5 times. But by now you should know that my middle name is “Murphy”
Removed and added restrict step. No joy.
Filter below

Provider too:

Does it work when you remove the Security Restrict?

No, it doesn’t

Can you turn on the output for the Security Provider step and check if it returns the identity of the logged in user

I see no “Output” on Security Provider.
Output on query and debug are on.
No error on userdetails.php.
But it doesn’t return any identity