Logon - method of object Pm
Login of the local user without the input window.
Logon(sName As String, sPassword As String) As Long
Pm.Logon sName, sPassword
|sName||(String) Login name (name not identifier) of the local user|
|sPassword||(String) Login password of the local user|
0 - Login succesfull.
1 - User not registered, log in failed.
2 - Password incorrect, log in failed.
-1 - Missing parameters, log in failed.
Registering by means of the Logon
method rather skips the logon window of the local user, but then the normal login process proceeds and it is equal to registering by the login window. This means that the entered data are compared with the list of users and then calling the PmRoot.onUserLogonBegin
event follows with default parameters. Only after that it is decided whether the login process of the local user passed.
The method can also be called in the graphic item events for Web Panels
. User login on the WEB cannot be competed wihout the user confirming the login and therefore does the same thing as the WndLogon
method - opens new user login window (the parameters sName
are not used).
In order to make the method correctly functional in the WEB panel, it is necessary to configure the panel (PmPanel object) to have the permission WebRead (to force the network user to login into the browser). It is also recommended check the configurator Strict mode of network users login into the application requiring the use of both name and password in the PmWeb object.