Methods
add(typeopt) → {User}
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 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 User object for the added user.
- Type
- User
get(userName) → {User}
Returns a User object for the given user-name.
Parameters:
Name | Type | Description |
---|---|---|
userName |
String | Name of the user. |
Returns:
- Type
- User
remove(userName)
Deletes the given user.
Parameters:
Name | Type | Description |
---|---|---|
userName |
String | Name of the user to be deleted. |
toArray() → {Array.<User>}
Returns an array of User objects representing all users in CompleteFTP including inbuilt ones.
Returns:
- Type
- Array.<User>