### Functions

## This function builds the LDAP accounts for the file upload.

    buildUploadAccounts(string $scope, array $data, array $ids, array $selectedModules) : mixed

If there are problems status messages will be printed automatically.

### Parameters

#### $scope

`string`

account type

#### $data

`array`

array containing one account in each element

#### $ids

`array`

array( => )

#### $selectedModules

`array`

selected account modules

### Returns

`mixed`array including accounts or false if there were errors

## Checks if the configuration options are valid

    checkConfigOptions(array $scopes, array $options) : array

### Parameters

#### $scopes

`array`

hash array (module name => array(account types))

#### $options

`array`

hash array containing all options (name => array(...))

### Returns

`array`list of error messages

## Checks if the profile options are valid

    checkProfileOptions(string $scope, array $options) : array

### Parameters

#### $scope

`string`

account type (user, group, host)

#### $options

`array`

hash array containing all options (name => array(...))

### Returns

`array`list of error messages

## Checks if the given IP is valid.

    check_ip(String $ip, boolean $subnet)

### Parameters

#### $ip

`String`

IP address

#### $subnet

`boolean`

IP must be a subnet

## Checks if there are conflicts between modules

    check_module_conflicts(array $selected, array $deps) : boolean

### Parameters

#### $selected

`array`

selected module names

#### $deps

`array`

module dependencies

### Returns

`boolean`false if no conflict was found, otherwise an array of array(selected module, conflicting module) if conflicts were found

## Checks if there are missing dependencies between modules.

    check_module_depends(array $selected, array $deps) : mixed

### Parameters

#### $selected

`array`

selected module names

#### $deps

`array`

module dependencies

### Returns

`mixed`false if no misssing dependency was found, otherwise an array of array(selected module, depending module) if missing dependencies were found

## This function executes one post upload action.

    doUploadPostActions(string $scope, array $data, array $ids, array $failed, array $selectedModules, array $accounts) : array

### Parameters

#### $scope

`string`

account type

#### $data

`array`

array containing one account in each element

#### $ids

`array`

array( => )

#### $failed

`array`

list of accounts which were not created successfully

#### $selectedModules

`array`

list of selected account modules

#### $accounts

`array`

list of LDAP entries

### Returns

`array`current status
array (
'status' => 'finished' | 'inProgress'
'module' =>
'progress' => 0..100
'errors' => array ()
)

## Runs any actions that need to be done before an LDAP entry is created.

    doUploadPreActions(String $scope, array $selectedModules, array $attributes) : array

### Parameters

#### $scope

`String`

account type

#### $selectedModules

`array`

list of selected account modules

#### $attributes

`array`

LDAP attributes of this entry (attributes are provided as reference, handle modifications of $attributes with care)

### Returns

`array`array which contains status messages. Each entry is an array containing the status message parameters.

## Returns an array with all available user module names

    getAvailableModules(string $scope, boolean $mustSupportAdminInterface) : array

### Parameters

#### $scope

`string`

account type (user, group, host)

#### $mustSupportAdminInterface

`boolean`

module must support LAM admin interface (default: false)

### Returns

`array`list of possible modules

## Returns a list of available PDF entries.

    getAvailablePDFFields(string $scope) : array

### Parameters

#### $scope

`string`

account type (user, group, host)

### Returns

`array`PDF entries (field ID => field label)

## Returns a hash array (module name => elements) of all module options for the configuration page.

    getConfigOptions(array $scopes) : array

### Parameters

#### $scopes

`array`

hash array (module name => array(account types))

### Returns

`array`configuration options

## Returns a help entry from an account module.

    getHelp(string $module, string $helpID, string $scope) : array

### Parameters

#### $module

`string`

module name

#### $helpID

`string`

help identifier

#### $scope

`string`

account type

### Returns

`array`help entry

## Returns the alias name of a module

    getModuleAlias(string $name, string $scope) : string

### Parameters

#### $name

`string`

the module name

#### $scope

`string`

the account type ("user", "group", "host")

### Returns

`string`alias name

## Returns a hash array (module name => dependencies) of all module dependencies

    getModulesDependencies(string $scope) : array

"dependencies" contains an array with two sub arrays: depends, conflicts
The elements of "depends" are either module names or an array of module names (OR-case).
The elements of conflicts are module names.

### Parameters

#### $scope

`string`

the account type (user, group, host)

### Returns

`array`dependencies

## Returns the elements for the profile page.

    getProfileOptions(string $scope) : array

### Parameters

#### $scope

`string`

account type (user, group, host)

### Returns

`array`profile elements

## Returns a list of LDAP attributes which can be used to form the RDN.

    getRDNAttributes(string $scope, array $selectedModules) : array

The list is already sorted by the priority given by the nodules.

### Parameters

#### $scope

`string`

account type (user, group, host)

#### $selectedModules

`array`

return only RDN attributes of these modules

### Returns

`array`list of LDAP attributes

## Returns true if the module is a base module

    getRequiredExtensions() : array

### Returns

`array`required extensions

## Returns an array containing all input columns for the file upload.

    getUploadColumns(string $scope, array $selectedModules) : array

Syntax:
array(
string: name, // fixed non-translated name which is used as column name (should be of format: _)
string: description, // short descriptive name
string: help, // help ID
string: example, // example value
boolean: required // true, if user must set a value for this column
)

### Parameters

#### $scope

`string`

account type

#### $selectedModules

`array`

selected account modules

### Returns

`array`column list

## Returns the LDAP filter used by the account lists

    get_ldap_filter(string $scope) : string

### Parameters

#### $scope

`string`

the account type ("user", "group", "host")

### Returns

`string`LDAP filter

## Returns true if the module is a base module

    is_base_module(string $name, string $scope) : boolean

### Parameters

#### $name

`string`

the module name

#### $scope

`string`

the account type ("user", "group", "host")

### Returns

`boolean`true if base module

## Helper function to sort descriptive options in parseHTML().

    lamCompareDescriptiveOptions(array $a, array $b) : integer

It compares the second entries of two arrays.

### Parameters

#### $a

`array`

first array

#### $b

`array`

second array

### Returns

`integer`compare result

## Sends commands to lamdaemon script.

    lamdaemon(array $command, string $server) : array

### Parameters

#### $command

`array`

command to execute

#### $server

`string`

remote server

### Returns

`array`Output of lamdaemon

## Takes a list of meta-HTML elements and prints the equivalent HTML output.

    parseHtml(string $module, mixed $input, array $values, boolean $restricted, integer $tabindex, string $scope) : array

The modules are not allowed to display HTML code directly but return meta HTML code. This allows to have a common design for all module pages.

### Parameters

#### $module

`string`

Name of account module

#### $input

`mixed`

htmlElement or array of htmlElement elements

#### $values

`array`

List of values which override the defaults in $input (name => value)

#### $restricted

`boolean`

If true then no buttons will be displayed

#### $tabindex

`integer`

Start value of tabulator index for input fields

#### $scope

`string`

Account type

### Returns

`array`List of input field names and their type (name => type)

## Prints a LAM help link.

    printHelpLink(array $entry, String $number, String $module, String $scope)

### Parameters

#### $entry

`array`

help entry

#### $number

`String`

help number

#### $module

`String`

module name

#### $scope

`String`

account scope

### Classes and interfaces

# passwordService¶

This interface needs to be implemented by all account modules which manage passwords.

« More »

# account¶

Manages the object class "account" for users and hosts.

« More »

# accountContainer¶

This class includes all modules and attributes of an account.

« More »

# asteriskAccount¶

Manages the Asterisk extension of user accounts.

« More »

# asteriskExtension¶

Manages Asterisk extensions.

« More »

# asteriskVoicemail¶

Manages the Asterisk extension of user accounts.

« More »

# authorizedServiceObject¶

Provides Authorized Service for accounts.

« More »

# baseModule¶

Parent class of all account modules.

« More »

# ddns¶

Manages DDNS entries.

« More »

# dhcp_settings¶

Manages DHCP entries.

« More »

# eduPerson¶

Manages the eduPerson extension for user accounts.

« More »

# fixed_ip¶

Manages fixed IP addresses.

« More »

# freeRadius¶

Manages FreeRadius accounts.

« More »

# generalInformation¶

Shows general information like the creation time of an account.

« More »

# hostObject¶

Manages the hosts to which a user may login.

« More »

# ieee802device¶

Provides MAC addresses for hosts.

« More »

# imapAccess¶

Manages mailboxes on an IMAP server.

« More »

# inetLocalMailRecipient¶

Provides mail routing for users.

« More »

# inetOrgPerson¶

This module manages LDAP attributes of the object class inetOrgPerson (e.g.

« More »

# kolabUser¶

Manages Kolab user accounts.

« More »

# ldapPublicKey¶

Manages SSH public keys.

« More »

# nisMailAlias¶

Provides NIS mail alias management.

« More »

# nisnetgroup¶

Manages entries based on the object class nisNetgroup.

« More »

# posixAccount¶

Manages the object class "posixAccount" for users and hosts.

« More »

# posixGroup¶

Manages the object class "posixGroup" for groups.

« More »

# puppetClient¶

Manages Puppet configuration options.

« More »

# quota¶

Manages quotas for users and groups.

« More »

# range¶

Manages DHCP ranges for DHCP server.

« More »

# samba3domain¶

Represents a Samba 3 domain entry

« More »

# sambaDomain¶

Manages Samba 3 domain entries.

« More »

# sambaGroupMapping¶

Manages the object class "sambaGroupMapping" for groups.

« More »

# sambaMungedDial¶

Manages terminal server settings for Samba 3.

« More »

# sambaSamAccount¶

Manages the object class "sambaSamAccount" for users and hosts.

« More »

# shadowAccount¶

Manages the object class "shadowAccount" for users.

« More »

# smbHash¶

Calculates NT and LM hashes.

« More »

# systemQuotas¶

Manages user quotas with the object class systemQuotas.

« More »

# windowsGroup¶

Manages Windows AD (e.g.

« More »

# windowsHost¶

Manages Windows AD (e.g.

« More »

# windowsUser¶

Manages Windows AD (e.g.

« More »

### Constants

## File header

    SAMBA_MUNGEDDIAL_FILEHEADER

## File header for old format.

    SAMBA_MUNGEDDIAL_FILEHEADER_OLD