Displaying name of logged in user in an include file

I’m struggling with how to display the name of the logged in person in an included file. My right column has an include file (_rightcol.php) which has either a login form or a logout button depending on whether the visitor is logged in. This works perfectly using the Show or Hide actions. But I also want to show the name of the logged in person above the logout button. I’ve tried everything but just can’t get it to work. I am desperate to not resort to custom PHP code as I want to use Wappler to its full potential.

All help gratefully received. Many thanks.

Jon

Hi @sitestreet,
Docs are your best friend here: Getting Details of the Logged In User and Binding them to your page

Thanks Teodor, I used that page to get me to where I am. But I think where I’m struggling is the way Server Connect is used on each page. I think I just haven’t got my head around the underlying structure of it all.

I’m a very long-term DW user and used DMX extensions many years ago before all the current ones which I know are what Wappler is built on. So I’m not transitioning from the almost-identical process of DW and DMX but from much older processes of DW with its built-in dynamic extensions. So some kind of tutorial to illustrate the fundamental workings is what I’m desperate for.

Does that make sense?

If you want to reuse the user details server action, just put it in your include file :slight_smile: