create_user

create_user. Creates a new user.

Runs on: the server only. The statement that calls it runs on the server, and its result is a server-side value: the server keeps it, the device never writes it, and it is copied to the device only when a device statement reads it.

Format:

create_user(username,password [,type] )

Parameters:

Parameter Type Description
username string The username to create. This must be unique i.e. it cannot match any other existing users
password string The password to assign to the new user
type string  [Optional]"normal" or "admin". If the type is not provided, it defaults to "normal"

Returned Value:

Type Description
clouduser returns the new clouduser object or false if not successful.