DeleteUser

(Security Manager Library)

Description: Removes a specified user name from the system.
Returns: Numeric (via the first parameter)
Usage: Script Only.
Function Groups: Security
Related to: ModifyAccount
Format: \SecurityManager\DeleteUser(PtrReturnCode, Username[, HaveLock])
Parameters:  
PtrReturnCode
Required. A pointer to a variable that will be used for the return code.

PtrReturnCode

Meaning

0

User does not exist. No action taken.

1

User deleted.

2

Denied. The calling context does not have the Manager general privilege.

6

The application cannot be edited.

UserName:
Required. Any expression for the name of the user account to delete.
HaveLock:
Optional Boolean expression. Set to true if we have the WC lock. Defaults to 0 or FALSE.
Comments: May only be called from a user-context that has the Manager general privilege. The return value of the function is the object value of the launched worker module. This will be set to Invalid when the operation has completed and may be used to discover when that occurs.
Use of this function requires an understanding of the VTScada security system and the general privileges. Please refer to System Privileges in the chapter Security Manager Service.