A DataFlex WebAPP project by default adds a login screen. This login screen is created by default in login.wo.

The peLoginMode property of the oWebApp object defines the type of login

It can either one of the following

  • lmLoginRequired
  • lmLoginSupported
  • lmLoginNone

lmLoginNone obviously lets the application know that no login is required for the application.

lmLoginRequired ensures that no pages in the application can be access without a valid active login

lmLoginSupported is a hybrid that allows access without a login but still offers a login capability that can be used to offer different information based on user rights

to find out if at the current time a user is logged in or a user does not require a login you can call the ValidLogin function of the oWebApp object

Get ValidLogin of oWebApp to bIsValid

This will return true if either the app does not require a login or if it does and the user is logged in

to find out if a user is logged in regardless of what the login mode is you can call the following

Get IsLoggedIn of ghoWebSessionManager to bIsLoggedIn