CreateUser

This function creates a new user in the project security system.

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

Syntax

CreateUser(strUserName,strGroup,strPassw { | ,optStrUserFullName } )
strUserName
The name of the user to be created.
strGroup
The name of the group to which the user will belong.
strPassw
The user's password.
optStrUserFullName
The full name of the user.

Returned value

This function returns the following possible values:
Value Description
-1 Internal error; contact Technical Support.
0 New user created successfully.
1 Invalid number of parameters.
2 Wrong parameter type.
3 User name already exists.
4 Group does not exist.
5 Failed to save to configuration file.
6 Invalid user.
7 User full name already exists.
8 Reentrant function call not allowed.
9 User clicked Cancel button when using the standard Create User dialog.
10 Invalid password, check the minimum password size specified for the group.
11 Invalid group. (Group may not have Runtime group option selected.)
12 Would open dialog.
13 User currently logged on does not have the rights to create user (i.e., user does not have Edit Security System).
14 The current Security Mode does not allow user to be created.

Notes

Users created with this function are not shown in the project's Security folder because they are stored in a secondary database. To manage this database, use the ExtUser.exe program (located in the Bin sub-folder of the application folder).

Examples

CreateUser( "Bob", "Admin", "Chocolate", "Bob Smith" )
CreateUser( "Albert", "Engineering", "EMC2", "Albert Jones" )