RemoveUser

The function RemoveUser removes a specified user from your project’s security system.

Function Group Execution Windows Embedded Thin Client Mobile Access
RemoveUser Security Synchronous Supported Supported Supported Not supported

Syntax

  RemoveUser(strUserName)  
Web Studio Help nctions security removeuser.xml d421688e103 RemoveUser

strUserName
The name of the user to be removed.

Returned value

This function returns the following possible values:
Value Description
0 The specified user was successfully removed.
1 Invalid number of parameters.
2 Wrong parameter type.
3 The current user does not have sufficient privileges to remove other users (i.e., the user does not have the option Edit Security System selected in the Security System settings).
4 The specified user cannot be removed.
5 The specified user does not exist.
6 Component-level failure (e.g., the LDAP server returned an error).
7 Failed to save changes to the configuration file.
8 The current security mode does not allow the specified user to be removed.

Examples

Remove the user named “Bob”:
  RemoveUser("Bob")  
Remove the user specified by the tag InvalidUser:
  RemoveUser(InvalidUser)  
Note: You can use this function to remove only those users who were created during project run time using the function CreateUser. You cannot use this function to remove users who were created using the Security System configuration tools in the project development environment. For more information, see Project Security.

RemoveUser