BlockUser

BlockUser is a built-in scripting function that blocks an existing user from logging onto a project.

Function Group Execution Windows Embedded Thin Client
BlockUser Security Synchronous Supported Supported Supported

Syntax

BlockUser(strUserName)
strUserName
The name of the user to block.

Returned value

This function returns the following possible values:
Value Description
0 User blocked successfully.
1 Invalid number of parameters.
2 Wrong parameter type.
3 Specified user does not exist.
4 User currently logged on does not have the rights to block (i.e., user does not have Edit Security System).
5 The operation on the distributed security system failed.
6 User cannot be blocked.
7 The current Security Mode does not allow user to be blocked/unblocked.
8 Internal error.

Examples

Block the user named Bob:
BlockUser( "Bob" )
Block the user named in position 3 of the array badUsers:
BlockUser( badUsers[3] )
Block the user that is currently logged on:
BlockUser( UserName )