Update cookies preferences
Promotic

GetUserInfo - method of the Pm object

Description:
Returns information from the user system.
Syntax:
Variant GetUserInfo(String sParams)
Parameters:
sParams(String) Additional parameters specify which information to be obtained. Entries are in the KeyVal format, for example "what:cfguserlist;type:local;".
"what:sss;" - The basic option specifies what to return.
what:cfguserlist; - User identifiers list (separated by comma).
what:cfggrouplist; - User groups identifiers list (separated by comma).
what:loguserarray; - An array of references to logged users (PmUser objects). The number of logged users can be obtained by the UBound function.
"type:sss;" (optional) - Specifies whether to return all users, only local users or only network users.
If not set, then all users are returned (local and network).
type:local; - Only local users.
type:net; - Only network users.
Note:
This method is not functional in Web panels.
Example1:
Obtains the list of all local users. First in the form of the user identificators list (separated by comma) followed by transfering the list into an array of identifiers.
JavaScriptVBScriptSelect and copy to clipboard

var sUsers = Pm.GetUserInfo("what:cfguserlist;type:local;");
var aUsers = Pm.StringSplit(sUsers, " ");
Example2:
Obtains an array of references to all logged users (PmUser objects) followed by the list of each logged user identifier reported into the INFO system.
JavaScriptVBScriptSelect and copy to clipboard

var iUser;
var aUsers = Pm.GetUserInfo("what:loguserarray;type:net;");
var nUsers = aUsers.GetSize(1);
for (iUser = 0; iUser < nUsers; iUser++)
{
Pm.Debug(aUsers.GetItem(iUser).Id);
}
PROMOTIC 9.0.31 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
Navigation:
 
- Pm
 
- Abs
- Cos
- E
- Exp
- GetUserInfo
 
 
- LN2
- PI
- Pow
- Sin
- Tan
© MICROSYS, spol. s r.o.