Promotic
WikipediaLinkedInYoutubeTwitterFacebook

GetUserInfo - method of the Pm object

Description:
Returns the information from the user system.
Syntax:
Variant GetUserInfo(String sParams)
Parameters:
sParams(String) Additional parameters defining which information to be obtained. Entries are in the KeyVal format, for example "what:cfguserlist;type:local;".
"what:sss;" - The basic option defining 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 identificators.
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 i;
var a = Pm.GetUserInfo("what:loguserarray;type:net;");
var n = a.GetSize(1);
for (i = 0; i < n; i++)
Pm.Debug(a.GetItem(i).Id);
PROMOTIC 9.0.17 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.Tavičská 845/21 703 00 Ostrava-Vítkovice