Cicode Programming Reference > Cicode Function Categories > Security Functions > UserDelete

UserDelete

Not available for a Windows user.

Deletes the record for a user. Changes are written to both the Users database and the runtime database in memory.

Note: Only those users assigned a role with "Manage User" privilege set to True can delete a user. Other users attempting to run will encounter an error.

An alarm server needs to be configured and running in the project, so that all clients are notified that an online change to the users configuration has been completed.

In order to perform user configuration changes online in a system with multiple computers running SCADA nodes using these functions, you will need to use the RUN and COPY parameters to check the updates are distributed throughout the system, and that the functions are called from the computer which uses the COPY path as it's RUN path.

This function is a blocking function. It blocks the calling Cicode task until the operation is complete.

Syntax

UserDelete(sName)

sName:

The name of the user.

Return Value

0 (zero) if successful, otherwise an error code is returned.

Related Functions

UserCreate, UserEditForm

Example

/* Delete Fred from the database */
UserDelete("Fred");

See Also

Security Functions

Published June 2018