createUser

Syntax

createUser(userId, password, [groupIds], [isAdmin=false])

Arguments

userId a string indicating a user name. It can only contain letters, underscores, or numbers. It cannot start with numbers. The length cannot exceed 30 characters.

password a string indicating the password. It cannot contain space or control characters. The length must be between 6 and 20 characters.

groupIds a string scalar/vector indicating the group(s) the user belongs to.

isAdmin a Boolean value indicating whether the user is an administrator.

Details

Create an user. This can only be executed by an administrator on the controller.

The groups in groupIds must have been created with createGroup.

Examples

Create a user with user name ‘JohnSmith’ and password ‘Qb0507’. This user belongs to group “research” and group “production. He is not an administrator.

$ createUser(`JohnSmith, "Qb0507#$", `research`production);