BlockUser is a built-in scripting function that blocks an existing user from logging onto a project. This allows you to disable a user account without deleting it.
|Function||Group||Execution||Windows||Embedded||Thin Client||Mobile Access|
- The name of the user to block.
|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.|
If you use this function to block a user, then the option User is blocked is selected in the User Account dialog. For more information, see Creating and configuring users.
BlockUser( "Bob" )
BlockUser( badUsers )
BlockUser( UserName )