Promotic
WikipediaLinkedInYoutubeTwitterFacebook

RemoveUser - method of object Pm

Description:
Delete existing user.
Syntax:
RemoveUser(sId As String, [sParams As String]) As Boolean
Calling:
b = Pm.RemoveUser(sId, 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 format PmNamedValues, 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 Values:
true - User was deleted sucesfully
false - Deleting user failed
Note:
This method is not functional for 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:
Deleting the specific user L_TEST. It is not necessary to enter the optional parameter sParams, because the user identifier sId is explicit.
result = Pm.RemoveUser("L_TEST")
Example2:
Deleting all TMP temporary users (local and network).
result = Pm.RemoveUser("$all", "stored:tmp;")
PROMOTIC 8.3.21 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.Tavičská 845/21 703 00 Ostrava-Vítkovice