Open Method (AUsers)

Opens existing or create new user file (.usr).

Syntax

bRet=Object.Open(sFileName [,sUserName] [,sPassword] [,bCreateNew])

The Open method syntax has the following parts:

 

Name

Type

Description

Object

AUsers

AUsers object

sFileName

Val BString

Users file path

sUserName

Val BString

user name - optional - see comments

sPassword

Val BString

password of the user

[bCreateNew]

Val Bool

True if creating new file. Optional - default value is False

Comments

When creating a new user file, if the user name entered, then a user will be created and will be given the administrator right. If the user name is not entered, then ATEasy will create the default administrator, "Administrator" with an empty password.

When opening an existing user file, you can simply pass an existing user file path.  If you enter user name, then the user will be logged in as the current user.

Calling this function will set the AUsers to reflect the current new/exiting active users file.

Example

The following two examples create end open a new users' file for users' info and will create a user named "Admin" for the first example and "Administrator" for the second example:

Users.Open("k:\\suj\\Testexec.usr", "Admin", "", True)

Users.Open("k:\\suj\\Testexec.usr",,, True)

The following two examples will open an existing file and in the second example, the user "April' will log in:

Users.Open("k:\\suj\\Testexec.usr")

Users.Open("k:\\suj\\TesrExec.user", "April", "")

Applies to

AUsers

See Also

FileName, SetDefaultFileName