NetTalk Central

Author Topic: problems with auto-redirect to login page.  (Read 4738 times)

Alan Telford

  • Jr. Member
  • **
  • Posts: 81
    • View Profile
problems with auto-redirect to login page.
« on: November 25, 2007, 04:01:41 PM »
My website requires the user to login before doing anything else.
If the user has not logged in but chooses (e.g. http://mysite/updateTable) it redirects them to the login pagelogin page. Then after they've logged in, it automatically opens up the "BrowseTable" page.
Likewise, if the session has timed out, but the website is still showing in the browser, the user may select an item (eg delete a record).
Nettalk now discovers they're not logged in, sends them to that page, the user logs in, and then it try's the original action (eg delete a record).

I would like to stop this and force them to open the main index page if they haven't logged in, or the session has timed-out.

Why?
1. The menu choice may not be appropriate. I change the menus based on who's logged in.
2. The record from the form may have changed, and should no longer be deleted.

For safety sake I would like the LOGIN page to always chain to the INDEXPAGE to ensure they are navigating through the menu options, and seeing current information and choices.

How do I do this?




Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11251
    • View Profile
Re: problems with auto-redirect to login page.
« Reply #1 on: November 27, 2007, 01:48:04 AM »
There are a couple ways to do this ...

Here's the most "generic".

LoginFormProcedure
GenerateForm routine
Before <Form> Tag embed point

Set loc:formaction and loc:formactiontarget
For example

loc:formaction = 'indexpage'
loc:formactiontarget = '_top'

Cheers
Bruce