User - Deatiled object description
See: Object User
This object is available for example:
During the authorization process the entered authorization data of the local or network user is compared with the list of defined users (see the page PmRoot > Users
). The first defined user found, whose definition corresponds with the entered authorization data, will be used in the user right evaluation system (see Description of the page Permissions
) and the specified data will be used by the User
The private user data:
In events onUserLogonEnd, onUserLogoff and onPageModify or in user methods of the PmPanel object it is possible to the specific user (User object) assign and read the assistant data named by the methods User.SetPrivateData and User.GetPrivateData. This is particullary useful for network users, enabling to store the different states for each logged user. This is handy especially for network users, because this way it is possible to save different status for each logged user. Then it is, for example, possible in the Web panel to have the Data binding UP - Binding to the logged user property data binding linked to GetPrivateData in order to display in the graphic item different values for each user.
The examples of using the private data:
Setting the private data by the server:
In the onUserLogonEnd
event, the "TEST" user will get the private data identified as dt0
with the value of 7, otherwise 0.
If pEvent.User.Name = "TEST" Then
pEvent.User.SetPrivateData "dt0", 7
pEvent.User.SetPrivateData "dt0", 0
Setting the private data by the client:
In the onButtonUp
event of the PmiButton
graphic item the "SettingData
" panel user method is called with two paramaters.
The "SettingData" panel method has two parameters sId and vVal. The logged user entered the value 7 with identificator "dt0" into his private data.
pContext.User.SetPrivateData sId, vVal
Reading the private data by the client:
. . .
The "GettingData" panel method has the sId parameter and returns the value.
pResult = pContext.User.GetPrivateData(sId)