18.01.2015 Views

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Appendix: Built-in Scripting Language<br />

Security functions<br />

These functions are used to manage users and groups in the project's security system.<br />

BlockUser<br />

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

Function Group Execution Windows Embedded Thin Client<br />

BlockUser Security Synchronous Supported Supported Supported<br />

Syntax<br />

BlockUser(strUserName)<br />

strUserName<br />

The name of the user to block.<br />

Returned value<br />

This function returns the following possible values:<br />

Value<br />

Description<br />

0 User blocked successfully.<br />

1 Invalid number of parameters.<br />

2 Wrong parameter type.<br />

3 Specified user does not exist.<br />

4 User currently logged on does not have the rights to block (i.e., user does not<br />

have Edit Security System).<br />

5 The operation on the distributed security system failed.<br />

6 User cannot be blocked.<br />

7 The current Security Mode does not allow user to be blocked/unblocked.<br />

8 Internal error.<br />

Examples<br />

Block the user named Bob:<br />

BlockUser( "Bob" )<br />

Block the user named in position 3 of the array badUsers:<br />

BlockUser( badUsers[3] )<br />

Block the user that is currently logged on:<br />

BlockUser( UserName )<br />

<strong>InduSoft</strong> Web Studio Page 585

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!