Config2_UserManager

Provides the APIs for managing users in CompleteFTP.

Instances of this class are obtained from:

Properties

PropertyTypeDescription
passwordPolicy Config2_PasswordPolicy

Password policy configuration for controlling password requirements.

tfa Config2_TFAManager

Two-factor authentication manager for managing TFA settings.

Methods

MethodReturnsDescription
add() Config2_User

Adds a new user of the given type.

get() Config2_User

Returns a Config2_User object for the given user-name.

getLocalWindowsUsers() Array

Returns a list of local Windows users on the server machine.

remove() void

Deletes the given user.

toArray() Array.<Config2_User>

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

Property Details

passwordPolicy :Config2_PasswordPolicy

Description:
  • Password policy configuration for controlling password requirements.

Password policy configuration for controlling password requirements.

Type:

tfa :Config2_TFAManager

Description:
  • Two-factor authentication manager for managing TFA settings.

Two-factor authentication manager for managing TFA settings.

Type:

Method Details

add(type) → {Config2_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 Config2_User class).

Parameters:
Name Type Description
type String

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

Returns:

A Config2_User object for the added user.

Type
Config2_User

get(userName) → {Config2_User|null}

Description:
Parameters:
Name Type Description
userName String

Name of the user.

Returns:

User object or null if not found.

Type
Config2_User | null

getLocalWindowsUsers() → {Array}

Description:
  • Returns a list of local Windows users on the server machine.

Returns:

Array of objects with userName, fullName, description, and homeDirectory properties.

Type
Array

remove(userName)

Description:
  • Deletes the given user.

Parameters:
Name Type Description
userName String

Name of the user to be deleted.

toArray() → {Array.<Config2_User>}

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

Returns:

Array of all user objects.

Type
Array.<Config2_User>