|pMe||(Object) Reference to the PROMOTIC object where the event rises.|
|pEvent||(Object) A referrence to object describing detailed information about the specific event.|
pEvent.User - (Object) User object that represents the user being logged in.
pEvent.UserId - (String) Identifier of the logged on user. The value of the parameter is preset if the login name entered by user is found in the list of users.
pEvent.Name - (String) Name of the logged on user. The value of this parameter is preset to the name entered by the user.
pEvent.Password - (String) Password of the logged on user. The value of this parameter is preset to the password entered by the user.
pEvent.Error - (Long) Specifies which information is not correct. According to the current value a warning - invalid user name or password - is eventually displayed after the event is completed. This value can be changed and modify the displayed warning.
0 - User name and password are valid.
1 - User name is not valid.
2 - Password is not valid.
pEvent.Enabled - (Boolean) Enable/disable the log-on of the user. The value of the parameter is preset according to the validity comparison of entered data with the list of users. If the value of the property is true, then the log-on of the user is enabled. Otherwise the value of the property is false. By this way it is possible, for example, to enable (disable) the log-on of the user from the list of users who in normal circumstances couldn't (could) be logged on.
If pEvent.User.Type = 1 Then
'... The code executed only for local users
Dim i, aUsers, nUsers
aUsers = Pm.GetUserInfo("what:loguserarray;type:net;")
nUsers = UBound(aUsers)
For i = 0 To nUsers
If aUsers(i).Id = pEvent.UserId Then
pEvent.Enabled = 0