Config1_UserManager

Provides the APIs for managing users in CompleteFTP. Instances of this class should be obtained using Config1.users.

Methods

MethodReturnsDescription
add() Config1_User

Adds a new user of the given type.

get() Config1_User

Returns a Config1_User object for the given user-name.

remove() void

Deletes the given user.

toArray() Array.<Config1_User>

Returns an array of Config1_User objects representing all users in CompleteFTP including inbuilt ones.

Method Details

add(typeopt) → {Config1_User}

Description:
  • Adds a new user of the given type. The user's properties will be initialized with default values including an auto-generated user-name.

    Note that, before changes can be applied, each user must at a minimum have a unique user-name, a password and a home folder, so the added user should have these properties set before it can login (see Config1_User class).

Parameters:
Name Type Attributes Default Description
type String <optional>
Non-Windows

Type of the user which must be either 'Windows' or 'Non-Windows' (case-insensitive).

Returns:

A Config1_User object for the added user.

Type
Config1_User

get(userName) → {Config1_User}

Description:
Parameters:
Name Type Description
userName String

Name of the user.

Returns:
Type
Config1_User

remove(userName)

Description:
  • Deletes the given user.

Parameters:
Name Type Description
userName String

Name of the user to be deleted.

toArray() → {Array.<Config1_User>}

Description:
  • Returns an array of Config1_User objects representing all users in CompleteFTP including inbuilt ones.

Returns:
Type
Array.<Config1_User>