session variables in custom file without header/footer

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
nyukuri
User
Posts: 123

session variables in custom file without header/footer

Post by nyukuri »

Hello,

I am using quite a number of small custom files that don't use/need any header/footer or common files. How can I check in these files if a user is logged in or who is logged in? I use session_start() but which SESSION variable can give me the username or the login status?

Thank you for your help,
Nyukuri


mobhar
User
Posts: 11702

Post by mobhar »

Please post your code for discussion.


arbei
User
Posts: 9355

Post by arbei »

If you included the common file in your custom file, you can use IsLoggedIn() function and CurrentUserName() to check the login status and user name of the login user.

Read help file topic: "Server Events and Client Scripts" -> "Some Global Functions" for more information.


mobhar
User
Posts: 11702

Post by mobhar »

You don't have to enable "Include common files" for the Custom Files in order to use the Security feature of PHPMaker web app.

Just include some mandatory files and add some line of code that similar to this post: http://www.hkvforums.com/viewtopic.php? ... 49#p121146


Post Reply