NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: robirenz on May 11, 2009, 06:12:28 AM
-
I have an netwebserver app, but I have found a bug that I need to clear.
I usually write in the database the user that logged in the database.
I do this by priming my origin field with p_web.GetSessionValue('user')
however I have found that sometimes that field is blank in my database
My theory here is that the session has expired and so therefore the variable I getting is blank now.
so I added this line in the "only serve if" part of the template... p_web.GetSessionValue('user') <> ''
however I'm kind of stumped with the "cannot server page" page.. I would rather the system send me back to the login screen,
how could I do this, or is there an option in the templates to be able to do this automatically..
Best Regards...
Roberto Renz
-
Hi Roberto,
If the user needs to be logged in to view the page, then rather just tick the "must be logged in" option on the advanced tab. That's a lot easier than entering
p_web.GetSessionValue('user') <> ''
And it'll work better since it has built-in functionality to redirect users to the login screen.
If you want a fast way to set this, go to the Properties of the WebHandler procedure, and you can select the "must be logged in" procedures on a list.
Cheers
Bruce