Description

Creates a new user or modifies information about an existing user in the current database.

Note: Only Level 1 (Administrator) and Level 2 (System Administrator) users can create users.

Syntax

Create_User (userID, userpassword, userlevel[, overwriteflag, expirval, expirdate])

Parameters

The Create_User routine has the following parameters.

ParameterDescription
userIDA user identifier. userID must begin with an alpha character, followed by any combination of characters, digits, and underscores and cannot include spaces. The length cannot exceed 49 characters.
userpasswordA string of characters, 6 to 20 characters in length. If not specified, the default is null, and a password is not required to access the database as this user.
userlevel

There are three levels of users. When the user is logged in, the value is stored in the system variable @ADMIN.

ValueDescription
0User.
1Administrator.
2System Administrator.

There is no default value for userlevel. If you do not specify a value, execution fails, and an error is generated.

overwriteflagIf overwriteflag is true (1), any existing access level is overwritten. If overwriteflag is 0 or unspecified, and the user exists, the access level cannot be changed.
expirval

Expiration parameter for the password. Possible values are:

ValueDescription
0Expires at next login
1Never Expires (default)
2Expires at expirdate.
expirdateIf expirval = 2, the expiration date (passed as a standard output converted date in a format such as mm/dd/yyyy). Only required if expirval = 2.

See also

Delete_UserList_Users

Example

/* At System Monitor prompt, create the administrative level user ACCOUNTING. 
The password is ACCT_PASS. The password never expires.*/
 
RUN CREATE_USER 'ACCOUNTING', 'ACCT_PASS', 1
/*  Create the user AC with no password, at the user level. 
The password needs to be changed at the next logon. */
 
RUN CREATE_USER 'AC', '', 0, 0, 0
/*  Create the user ACCTG with a password ACCTG_PASS, as a system administrator. 
The password expires on October 3, 2003 */
RUN CREATE_USER 'ACCTG', 'ACCTG_PASS', 2, 1, 2, '10/3/2003'
  • No labels