NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: osquiabro on April 01, 2016, 06:46:30 AM
-
trying to redirect in login according user role with p web.SendFile example:
CASE p_web.GetSessionLevel()
OF 1
p_web._SendFile('IndexPage',0)
OF 2
p_web._SendFile('PageForActiveTransactions',0)
OF 3
p_web._SendFile('PageForSalesCustomer',0)
ELSE
p_web._SendFile('IndexPage',0)
END
but NET:SendHeader in webhandler is always (1) value and can't change with p_web._SendFile('IndexPage',0)
-
Try this
Case
of 1; p_web.Script( p_web.WindowOpen( 'IndexPage' ))
of 2; p_web.Script( p_web.WindowOpen( 'CustomerPage' ))
and if you want to change the theme for different users
of 3
p_web.ChangeTheme( 'Shoestrap' )
p_web.Script( p_web.WindowOpen( 'NiceUserPage' ))
-
Thanks for this. This was helpful for me today.
I used it and it worked nicely.
For anyone wondering where this code goes, it goes in LoginForm after the call to p_web.ValidateLogin and the code that sets the cookies.
Regards,
Ubaidullah Nubar.