NetTalk Central

Author Topic: From Login to diffrent pages  (Read 3570 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
From Login to diffrent pages
« on: May 07, 2020, 12:34:17 PM »
Hi, I have a login proc with which logs in different types of users.
I need to go to a different page depending on the type of user.
How to do it?
-----------
Regards
Alberto

Graham

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: From Login to diffrent pages
« Reply #1 on: May 07, 2020, 08:40:10 PM »
Hi

I have the same situation - there may be other ways to do this but approach that is working for me:

Login page template settings, I leave "URL on Save" and "URL on Cancel" blank

In Login ValidateUpdate Routine, set a local variable to establish User Type then:

If LoginValid then
  p_web.SetSessionLoggedIn (1)
  case loc:UserType
  of 1
    p_web.Script( p_web.WindowOpen( 'PageUser1'))
  of 2
    p_web.Script( p_web.WindowOpen( 'PageUser2'))
  of 3
    p_web.Script( p_web.WindowOpen( 'PageUser3'))
  end
end