Promotic

RemoveUser - method of the Pm object

Description:
Deletes existing PROMOTIC user.
Syntax:
Boolean RemoveUser(String sId, [String sParams])
Parameters:
sId(String) Existing (local or network) user identifier.
For multiple users deletion the "$all" text can be entered.
sParams[optional] (String) Additional parameters of the user. Entries are in the KeyVal format, for example "type:local;stored:tmp;".
"type:local/net;" (optional) - User type (local = local user, net = network user).
If the type is specified, then the user is removed only if it is of the requested type.
If not set, then it is independent on the user type.
"stored:ini/tmp;" (optional) - User configuration saving method, where ini means saving into local INI text file and tmp means saving temporarily in computer´s memory.
If the saving type is specified, then the user is removed only if it is of the requested type.
If not set, then it is independent on the user type.
Return value:
true - User was deleted sucesfully
false - Delete of the user failed
Note:
This method is not functional in Web panels.

Caution:
If the sId parameter is set to "$all" and the sParams parameter is simultaneously missing, then in order to preserve compatibility with older versions, only the users stored in temporary memory are deleted (the same way as if the stored:tmp; was set).
If the sParams parameter is set (e.g. even empty string), then the operation respects this setting.
Example1:
Deletes the specific PROMOTIC user L_TEST. It is not necessary to enter the optional sParams parameter because the user identifier sId is explicit.
JavaScriptVBScriptSelect and copy to clipboard

var res = Pm.RemoveUser("L_TEST");
Example2:
Deletes all TMP temporary PROMOTIC users (local and network).
JavaScriptVBScriptSelect and copy to clipboard

var res = Pm.RemoveUser("$all", "stored:tmp;");
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

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