# LDAP Account Manager

# lib/config.inc

# Properties

author
author
package

## Description

This file includes functions to manage the configuration files.

## Functions

### setSSLCaCert( ) : n/a

#### Description

Sets the environment variables for custom SSL CA certificates.

#### Return value

Type | Description
--- | ---
n/a | n/a

### setlanguage( ) : n/a

#### Description

Sets language settings for automatic translation

#### Return value

Type | Description
--- | ---
n/a | n/a

### checkChmod( $right, $target, $chmod, ) : \true,

#### Description

Checks whether a specific flag in the rights string is set.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$right | n/a | read,write or execute |
$target | n/a | owner,group or other |
$chmod | n/a | the chmod rights |

#### Return value

Type | Description
--- | ---
\true, | if the chmod $right for $target were set

### getConfigProfiles( ) : array

#### Description

Returns an array of string with all available configuration profiles (without .conf)

#### Return value

Type | Description
--- | ---
array | profile names

### deleteConfigProfile( String $name, ) : String

#### Description

Deletes the given server profile.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$name | String | profile name |

#### Return value

Type | Description
--- | ---
String | null if success or error message if failed

### LAMVersion( ) : string

#### Description

Returns the version number of this LAM installation.
Format: <major version>.<minor version>.<patch level>
Major/minor version are always numbers, patch level may contain letters for inofficial releases only (e.g. 0.5.alpha1).

#### Return value

Type | Description
--- | ---
string | version number

### metaRefresh( string $page, ) : n/a

#### Description

Prints a meta refresh page

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$page | string | the URL of the target page |

#### Return value

Type | Description
--- | ---
n/a | n/a

### isAccountTypeHidden( String $type, ) : boolean

#### Description

Checks if the given account type is hidden.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$type | String | account type (e.g. user) |

#### Return value

Type | Description
--- | ---
boolean | is hidden

## Classes

### LAMConfig

# Properties

Extends
Implements
package
configuration
Abstract
No
Final
No

#### Description

This class manages .conf files.

#### Methods

__construct, check_Passwd, getAccessLevel, getHttpAuthentication, getLamProMailFrom, getLamProMailIsHTML, getLamProMailReplyTo, getLamProMailSubject, getLamProMailText, getLoginMethod, getLoginSearchDN, getLoginSearchFilter, getLoginSearchPassword, getLoginSearchSuffix, getName, getPath, getToolSettings, getUseTLS, get_AccountModules, get_ActiveTypes, get_Admins, get_Adminstring, get_ServerURL, get_Suffix, get_cacheTimeout, get_cacheTimeoutSec, get_defaultLanguage, get_listAttributes, get_moduleSettings, get_scriptPath, get_scriptRights, get_scriptServers, get_searchLimit, get_typeSettings, hashPassword, isWritable, reload, save, setAccessLevel, setHttpAuthentication, setLamProMailFrom, setLamProMailIsHTML, setLamProMailReplyTo, setLamProMailSubject, setLamProMailText, setLoginMethod, setLoginSearchDN, setLoginSearchFilter, setLoginSearchPassword, setLoginSearchSuffix, setToolSettings, setUseTLS, set_AccountModules, set_ActiveTypes, set_Adminstring, set_Passwd, set_ServerURL, set_Suffix, set_cacheTimeout, set_defaultLanguage, set_listAttributes, set_moduleSettings, set_scriptPath, set_scriptRights, set_scriptServers, set_searchLimit, set_typeSettings,

### __construct( String $file, ) : n/a

#### Description

Loads preferences from config file

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$file | String | file name without ".conf" (e.g. lam) |

#### Return value

Type | Description
--- | ---
n/a | n/a

### check_Passwd( String $password, ) : boolean

#### Description

Checks if the given password matches.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$password | String |  |

#### Return value

Type | Description
--- | ---
boolean | true, if matches

### getAccessLevel( ) : int

#### Description

Returns the access level for this profile.

#### Return value

Type | Description
--- | ---
int | level

### getHttpAuthentication( ) : String

#### Description

Returns if HTTP authentication should be used.

#### Return value

Type | Description
--- | ---
String | $httpAuthentication use HTTP authentication (&#039;true&#039; or &#039;false&#039;)

### getLamProMailFrom( ) : String

#### Description

Returns the sender address for password reset mails.

#### Return value

Type | Description
--- | ---
String | mail address

### getLamProMailIsHTML( ) : boolean

#### Description

Returns if the password reset mail content should be treated as HTML.

#### Return value

Type | Description
--- | ---
boolean | HTML or text

### getLamProMailReplyTo( ) : String

#### Description

Returns the reply-to address for password reset mails.

#### Return value

Type | Description
--- | ---
String | mail address

### getLamProMailSubject( ) : String

#### Description

Returns the subject for password reset mails.

#### Return value

Type | Description
--- | ---
String | subject

### getLamProMailText( ) : String

#### Description

Returns the mail body for password reset mails.

#### Return value

Type | Description
--- | ---
String | body

### getLoginMethod( ) : String

#### Description

Returns the login method.

#### Return value

Type | Description
--- | ---
String | login method

#### Tags

Name | Description
--- | ---
see |
see |

### getLoginSearchDN( ) : String

#### Description

Returns the DN for the login search bind user.

#### Return value

Type | Description
--- | ---
String | DN

### getLoginSearchFilter( ) : String

#### Description

Returns the login search filter.

#### Return value

Type | Description
--- | ---
String | search filter

### getLoginSearchPassword( ) : String

#### Description

Returns the password for the login search bind user.

#### Return value

Type | Description
--- | ---
String | password

### getLoginSearchSuffix( ) : String

#### Description

Returns the login search suffix.

#### Return value

Type | Description
--- | ---
String | suffix

### getName( ) : String

#### Description

Returns the name of the config file

#### Return value

Type | Description
--- | ---
String | name

### getPath( ) : string

#### Description

Returns the path to the config file.

#### Return value

Type | Description
--- | ---
string | path on filesystem

### getToolSettings( ) : array

#### Description

Returns the tool settings.

#### Return value

Type | Description
--- | ---
array | $toolSettings tool settings

### getUseTLS( ) : String

#### Description

Returns if TLS is activated.

#### Return value

Type | Description
--- | ---
String | yes or no

### get_AccountModules( string $scope, ) : array

#### Description

Returns an array of all selected account modules

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$scope | string | account type |

#### Return value

Type | Description
--- | ---
array | user modules

### get_ActiveTypes( ) : array

#### Description

Returns a list of active account types.

#### Return value

Type | Description
--- | ---
array | list of types

### get_Admins( ) : array

#### Description

Returns an array of string with all admin names

#### Return value

Type | Description
--- | ---
array | the admin names

### get_Adminstring( ) : string

#### Description

Returns all admin users seperated by semicolons

#### Return value

Type | Description
--- | ---
string | the admin string

### get_ServerURL( ) : string

#### Description

Returns the server address as string

#### Return value

Type | Description
--- | ---
string | server address

### get_Suffix( string $scope, ) : string

#### Description

Returns the LDAP suffix for the given account type

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$scope | string | account type |

#### Return value

Type | Description
--- | ---
string | the LDAP suffix

### get_cacheTimeout( ) : integer

#### Description

Returns the LDAP cache timeout in minutes

#### Return value

Type | Description
--- | ---
integer | cache time

### get_cacheTimeoutSec( ) : integer

#### Description

Returns the LDAP cache timeout in seconds

#### Return value

Type | Description
--- | ---
integer | cache time

### get_defaultLanguage( ) : string

#### Description

Returns the default language string

#### Return value

Type | Description
--- | ---
string | default language

### get_listAttributes( string $scope, ) : string

#### Description

Returns the list of attributes to show in user list

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$scope | string | account type |

#### Return value

Type | Description
--- | ---
string | the attribute list

### get_moduleSettings( ) : array

#### Description

Returns a list of saved module settings

#### Return value

Type | Description
--- | ---
array | list of settings: array(name =&gt; value)

### get_scriptPath( ) : string

#### Description

Returns the path to the external script

#### Return value

Type | Description
--- | ---
string | script path

### get_scriptRights( ) : string

#### Description

Returns the chmod value for new home directories.

#### Return value

Type | Description
--- | ---
string | rights

### get_scriptServers( ) : string

#### Description

Returns the servers of the external script as a Array

#### Return value

Type | Description
--- | ---
string | script servers

### get_searchLimit( ) : integer

#### Description

Returns the LDAP search limit.

#### Return value

Type | Description
--- | ---
integer | search limit

### get_typeSettings( ) : array

#### Description

Returns a list of saved type settings

#### Return value

Type | Description
--- | ---
array | list of settings: array(name =&gt; value)

### hashPassword( String $password, String $salt, ) : String

#### Description

Returns the hashed password.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$password | String | password |
$salt | String | salt |

#### Return value

Type | Description
--- | ---
String | hash value

### isWritable( ) : boolean

#### Description

Returns if the file can be written on the filesystem.

#### Return value

Type | Description
--- | ---
boolean | true if file is writable

### reload( ) : boolean

#### Description

Reloads preferences from config file

#### Return value

Type | Description
--- | ---
boolean | true if file was readable

### save( ) : n/a

#### Description

Saves preferences to config file

#### Return value

Type | Description
--- | ---
n/a | n/a

### setAccessLevel( int $level, ) : n/a

#### Description

Sets the access level for this profile.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$level | int | level |

#### Return value

Type | Description
--- | ---
n/a | n/a

### setHttpAuthentication( String $httpAuthentication, ) : n/a

#### Description

Specifies if HTTP authentication should be used.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$httpAuthentication | String | use HTTP authentication ('true' or 'false') |

#### Return value

Type | Description
--- | ---
n/a | n/a

### setLamProMailFrom( String $lamProMailFrom, ) : boolean

#### Description

Sets the sender address for password reset mails.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$lamProMailFrom | String | mail address |

#### Return value

Type | Description
--- | ---
boolean | true if address is valid

### setLamProMailIsHTML( boolean $lamProMailIsHTML, ) : n/a

#### Description

Sets if the password reset mail content should be treated as HTML.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$lamProMailIsHTML | boolean |  |

#### Return value

Type | Description
--- | ---
n/a | n/a

### setLamProMailReplyTo( String $lamProMailReplyTo, ) : boolean

#### Description

Sets the reply-to address for password reset mails.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$lamProMailReplyTo | String | mail address |

#### Return value

Type | Description
--- | ---
boolean | true if address is valid

### setLamProMailSubject( String $lamProMailSubject, ) : n/a

#### Description

Sets the subject for password reset mails.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$lamProMailSubject | String | subject |

#### Return value

Type | Description
--- | ---
n/a | n/a

### setLamProMailText( String $lamProMailText, ) : n/a

#### Description

Sets the mail body for password reset mails.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$lamProMailText | String | body |

#### Return value

Type | Description
--- | ---
n/a | n/a

### setLoginMethod( String $loginMethod, ) : n/a

#### Description

Sets the login method.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$loginMethod | String |  |

#### Return value

Type | Description
--- | ---
n/a | n/a

### setLoginSearchDN( String $loginSearchDN, ) : boolean

#### Description

Sets the DN for the login search bind user.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$loginSearchDN | String | DN |

#### Return value

Type | Description
--- | ---
boolean | true if DN is valid

### setLoginSearchFilter( String $loginSearchFilter, ) : n/a

#### Description

Sets the login search filter.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$loginSearchFilter | String | search filter |

#### Return value

Type | Description
--- | ---
n/a | n/a

### setLoginSearchPassword( String $loginSearchPassword, ) : n/a

#### Description

Sets the password for the login search bind user.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$loginSearchPassword | String | password |

#### Return value

Type | Description
--- | ---
n/a | n/a

### setLoginSearchSuffix( String $loginSearchSuffix, ) : n/a

#### Description

Sets the login search suffix.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$loginSearchSuffix | String | suffix |

#### Return value

Type | Description
--- | ---
n/a | n/a

### setToolSettings( array $toolSettings, ) : boolean

#### Description

Sets the tool settings.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$toolSettings | array | tool settings |

#### Return value

Type | Description
--- | ---
boolean | true if ok

### setUseTLS( $useTLS, ) : boolean

#### Description

Sets if TLS is activated.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$useTLS | n/a |  |

#### Return value

Type | Description
--- | ---
boolean | true if $useTLS has correct format

### set_AccountModules( array $modules, string $scope, ) : boolean

#### Description

Sets the selected account modules

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$modules | array | array with module names (not aliases!) |
$scope | string | account type |

#### Return value

Type | Description
--- | ---
boolean | true if $modules has correct format

### set_ActiveTypes( $types, ) : n/a

#### Description

Sets the list of active types.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$types | n/a |  |

#### Return value

Type | Description
--- | ---
n/a | n/a

### set_Adminstring( string $value, ) : boolean

#### Description

Sets the admin string

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$value | string | new admin string that contains all admin users seperated by semicolons |

#### Return value

Type | Description
--- | ---
boolean | true if $value has correct format

### set_Passwd( string $value, ) : boolean

#### Description

Sets the preferences wizard password

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$value | string | new password |

#### Return value

Type | Description
--- | ---
boolean | true if $value has correct format

### set_ServerURL( string $value, ) : boolean

#### Description

Sets the server address

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$value | string | new server address |

#### Return value

Type | Description
--- | ---
boolean | true if $value has correct format

### set_Suffix( string $scope, string $value, ) : boolean

#### Description

Sets the LDAP suffix where accounts are saved

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$scope | string | account type |
$value | string | new LDAP suffix |

#### Return value

Type | Description
--- | ---
boolean | true if $value has correct format

### set_cacheTimeout( integer $value, ) : boolean

#### Description

Sets the LDAP cache timeout in minutes (0,1,2,5,10,15)

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$value | integer | new cache timeout |

#### Return value

Type | Description
--- | ---
boolean | true if $value has correct format

### set_defaultLanguage( string $value, ) : boolean

#### Description

Sets the default language string

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$value | string | new default language |

#### Return value

Type | Description
--- | ---
boolean | true if $value has correct format

### set_listAttributes( string $value, string $scope, ) : boolean

#### Description

Sets the list of attributes to show in user list

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$value | string | new attribute string |
$scope | string | account type |

#### Return value

Type | Description
--- | ---
boolean | true if $value has correct format

### set_moduleSettings( array $settings, ) : boolean

#### Description

Sets the settings for the account modules.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$settings | array | list of module setting array(name => value) |

#### Return value

Type | Description
--- | ---
boolean | true if $settings has correct format

### set_scriptPath( string $value, ) : boolean

#### Description

Sets the path to the external script

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$value | string | new script path |

#### Return value

Type | Description
--- | ---
boolean | true if $value has correct format

### set_scriptRights( string $chmod, ) : boolean

#### Description

Sets the rights for the home directory.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$chmod | string | the rights |

#### Return value

Type | Description
--- | ---
boolean | true if values has correct format

### set_scriptServers( string $value, ) : boolean

#### Description

Sets the servers of the external script

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$value | string | new script servers |

#### Return value

Type | Description
--- | ---
boolean | true if $value has correct format

### set_searchLimit( integer $value, ) : boolean

#### Description

Sets the LDAP search limit.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$value | integer | new search limit |

#### Return value

Type | Description
--- | ---
boolean | true if $value has correct format

### set_typeSettings( array $settings, ) : boolean

#### Description

Sets the settings for the account types.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$settings | array | list of type setting array(name => value) |

#### Return value

Type | Description
--- | ---
boolean | true if $settings has correct format

#### Properties

$Admins, $Passwd, $ServerURL, $accessLevel, $activeTypes, $cachetimeout, $defaultLanguage, $file, $httpAuthentication, $lamProMailFrom, $lamProMailIsHTML, $lamProMailReplyTo, $lamProMailSubject, $lamProMailText, $loginMethod, $loginSearchDN, $loginSearchFilter, $loginSearchPassword, $loginSearchSuffix, $moduleSettings, $scriptPath, $scriptRights, $scriptServer, $searchLimit, $settings, $toolSettings, $treesuffix, $typeSettings, $useTLS,

### private $Admins =

Array of string: users with admin rights

### private $Passwd =

Password to edit preferences

### private $ServerURL =

Server address (e.g. ldap://127.0.0.1:389)

### private $accessLevel = \LAMconfig::ACCESS_ALL

access level

### private $activeTypes = "user,group,host,smbDomain"

Active account types

### private $cachetimeout =

LDAP cache timeout

### private $defaultLanguage =

Default language

### private $file =

Name of configuration file

### private $httpAuthentication = 'false'

specifies if HTTP authentication should be used

### private $lamProMailFrom = ''

email address for sender of password reset mails

### private $lamProMailIsHTML = 'false'

treat password reset mail body as HTML

### private $lamProMailReplyTo = ''

reply-to email address for password reset mails

### private $lamProMailSubject = ''

subject for password reset mails

### private $lamProMailText = ''

mail body for password reset mails

### private $loginMethod = \LAMconfig::LOGIN_LIST

login method

### private $loginSearchDN = ''

bind user for login search

### private $loginSearchFilter = 'uid=%USER%'

search filter for login

### private $loginSearchPassword = ''

bind password for login search

### private $loginSearchSuffix = 'dc=yourdomain,dc=org'

search suffix for login

### private $moduleSettings = array()

module settings

### private $scriptPath =

Path to external lamdaemon script on server where it is executed
This is used for managing quota and home directories. optional setting, may not be defined

### private $scriptRights = '750'

The rights for the home directory

### private $scriptServer =

Servers where lamdaemon script is executed
This is used for managing quota and home directories. optional setting, may not be defined

### private $searchLimit = 0

LDAP search limit

### private $settings = array("ServerURL", "useTLS", "Passwd", "Admins", "treesuffix", "defaultLanguage", "scriptPath", "scriptServer", "scriptRights", "cachetimeout", "modules", "activeTypes", "types", "tools", "accessLevel", 'loginMethod', 'loginSearchSuffix', 'loginSearchFilter', 'searchLimit', 'lamProMailFrom', 'lamProMailReplyTo', 'lamProMailSubject', 'lamProMailText', 'lamProMailIsHTML', 'httpAuthentication', 'loginSearchDN', 'loginSearchPassword')

List of all settings in config file

### private $toolSettings = array()

tool settings

### private $treesuffix =

LDAP suffix for tree view

### private $typeSettings = array()

type settings

### private $useTLS =

enables/disables TLS encryption

#### Constants

### ACCESS_ALL = 100

### ACCESS_PASSWORD_CHANGE = 20

### ACCESS_READ_ONLY = 0

### LINE_SEPARATOR = '+::+'

line separator

### LOGIN_LIST = 'list'

### LOGIN_SEARCH = 'search'

### SAVE_FAIL = 1

### SAVE_OK = 0

### LAMCfgMain

# Properties

Extends
Implements
package
configuration
Abstract
No
Final
No

#### Description

This class manages config.cfg.

#### Methods

__construct, checkPassword, deleteSSLCaCert, getInternalSSLCaCertFileName, getSSLCaCertPath, getSSLCaCertTempFileName, getSSLCaCertificateContent, getSSLCaCertificates, hashPassword, isConfigFileExisting, isWritable, reload, save, setPassword, splitSSLCaCertificateContent, uploadSSLCaCert,

### __construct( ) : n/a

#### Description

Loads preferences from config file

#### Return value

Type | Description
--- | ---
n/a | n/a

### checkPassword( String $password, ) : boolean

#### Description

Checks if the given password matches.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$password | String | password |

#### Return value

Type | Description
--- | ---
boolean | true, if password matches

### deleteSSLCaCert( int $index = null, ) : n/a

#### Description

Marks a single or all SSL CA certificate files for deletion.
The changes take effect on save().

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$index | int | certificate index, null deletes all certificates (default: null) | null

#### Return value

Type | Description
--- | ---
n/a | n/a

### getInternalSSLCaCertFileName( ) : String

#### Description

Returns the file name that will be used internally to store the CA file.

#### Return value

Type | Description
--- | ---
String | file name

### getSSLCaCertPath( ) : String

#### Description

Returns the path to the SSL CA certificate file that overrides the system certificates.

#### Return value

Type | Description
--- | ---
String | path to certificate file or null if certificate is not overridden

### getSSLCaCertTempFileName( ) : String

#### Description

Returns the name of a temporary file in tmp that contains the SSL certificate.
The file contains either the stored data in serverCerts or the uploaded data.

#### Return value

Type | Description
--- | ---
String | file name or null if no certificate was set

### getSSLCaCertificateContent( ) : String

#### Description

Returns the content of the certificate file or uploaded data.

#### Return value

Type | Description
--- | ---
String | null or certificate content

### getSSLCaCertificates( ) : array

#### Description

Returns a list of all CA certificates.

#### Return value

Type | Description
--- | ---
array | list of certificates as output of openssl_x509_parse()

### hashPassword( String $password, String $salt, ) : String

#### Description

Returns the hashed password.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$password | String | password |
$salt | String | salt |

#### Return value

Type | Description
--- | ---
String | hash value

### isConfigFileExisting( ) : boolean

#### Description

Returns if the configuration file is existing.

#### Return value

Type | Description
--- | ---
boolean | exists

### isWritable( ) : boolean

#### Description

Returns if the configuration file is writable.

#### Return value

Type | Description
--- | ---
boolean | writable

### reload( ) : boolean

#### Description

Reloads preferences from config file config.cfg

#### Return value

Type | Description
--- | ---
boolean | true if file was readable

### save( ) : n/a

#### Description

Saves preferences to config file config.cfg

#### Return value

Type | Description
--- | ---
n/a | n/a

### setPassword( String $password, ) : n/a

#### Description

Sets a new config password.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$password | String | new password |

#### Return value

Type | Description
--- | ---
n/a | n/a

### splitSSLCaCertificateContent( String $content, ) : array

#### Description

Splits the certificate content into single PEM data chunks.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$content | String | PEM file content |

#### Return value

Type | Description
--- | ---
array | one element for each certificate chunk

### uploadSSLCaCert( String $cert, ) : mixed

#### Description

Uploads a new SSL CA cert.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$cert | String | file content in DER/PEM format |

#### Return value

Type | Description
--- | ---
mixed | TRUE if format is correct, error message if file is not accepted

#### Properties

$allowedHosts, $conffile, $default, $delSSLCaCert, $logDestination, $logLevel, $password, $passwordMinClasses, $passwordMinLength, $passwordMinLower, $passwordMinNumeric, $passwordMinSymbol, $passwordMinUpper, $sessionTimeout, $settings, $uploadedSSLCaCert,

### public $allowedHosts =

list of hosts which may access LAM

### private $conffile =

path to config file

### public $default =

Default profile

### private $delSSLCaCert = false

SSL certificate should be deleted on save()

### public $logDestination =

log destination ("SYSLOG":syslog, "/.
..":file, "NONE":none)

### public $logLevel =

log level

### private $password =

Password to change config.cfg

### public $passwordMinClasses = 0

minimum character classes (upper, lower, numeric, symbols)

### public $passwordMinLength = 0

minimum length for passwords

### public $passwordMinLower = 0

minimum lowercase characters

### public $passwordMinNumeric = 0

minimum numeric characters

### public $passwordMinSymbol = 0

minimum symbol characters

### public $passwordMinUpper = 0

minimum uppercase characters

### public $sessionTimeout =

Time of inactivity before session times out (minutes)

### private $settings = array("password", "default", "sessionTimeout", "logLevel", "logDestination", "allowedHosts", "passwordMinLength", "passwordMinUpper", "passwordMinLower", "passwordMinNumeric", "passwordMinClasses", "passwordMinSymbol")

list of data fields to save in config file

### private $uploadedSSLCaCert = null

uploaded SSL certificate that is stored to disk on save()
Documentation was generated by phpDocumentor 2.0.1 .

# Namespaces

- global

# Packages

- Crypt_AES
  - Crypt_AES
    Pure-PHP implementation of AES.
- Crypt_DES
  - Crypt_DES
    Pure-PHP implementation of DES.
- Crypt_Hash
  - Crypt_Hash
    Pure-PHP implementations of keyed-hash message authentication codes (HMACs) and various cryptographic hashing functions.
- Crypt_RC4
  - Crypt_RC4
    Pure-PHP implementation of RC4.
- Crypt_RSA
  - Crypt_RSA
    Pure-PHP PKCS#1 compliant implementation of RSA.
- Crypt_Random
- Crypt_Rijndael
  - Crypt_Rijndael
    Pure-PHP implementation of Rijndael.
- Crypt_TerraDES
  - Crypt_TripleDES
    Pure-PHP implementation of Triple DES.
- Crypt_TripleDES
- Help
- LDAP
  - Ldap
    Ldap manages connection to LDAP and includes several helper functions.
- Math_BigInteger
  - Math_BigInteger
    Pure-PHP arbitrary precision integer arithmetic library. Supports base-2, base-10, base-16, and base-256 numbers.
- Net_SFTP
  - Net_SFTP
    Pure-PHP implementations of SFTP.
- Net_SSH1
  - Net_SSH1
    Pure-PHP implementation of SSHv1.
- Net_SSH2
  - Net_SSH2
    Pure-PHP implementation of SSHv2.
- PDF
  - UFPDF
    Main UFPDF class for creating Unicode PDF documents
  - lamPDF
    Creates a LAM information page in PDF format.
  - xmlParser
    Simple XML parser.
- PHP_Compat
- configuration
  - LAMCfgMain
    This class manages config.cfg.
  - LAMConfig
    This class manages .conf files.
- horde.cipher
  - Horde_Cipher_blowfish
- lam
  - smbHash
    Calculates NT and LM hashes.
- lib
  - AttributeType
    Represents an LDAP AttributeType
  - MatchingRule
    Represents an LDAP MatchingRule
  - MatchingRuleUse
    Represents an LDAP schema matchingRuleUse entry
  - ObjectClass
    Represents an LDAP objectClass
  - ObjectClassAttribute
    A simple class for representing AttributeTypes used only by the ObjectClass class.
  - SchemaItem
    Generic parent class for all schema items. A schema item is an ObjectClass, an AttributeBype, a MatchingRule, or a Syntax.
  - Syntax
    Represents an LDAP Syntax
- lists
  - lamAsteriskExtList
    Generates the list view.
  - lamBooleanListOption
    Boolean option for list configuration.
  - lamDHCPList
    Generates the list view.
  - lamGroupList
    Generates the list view.
  - lamHostList
    Generates the list view.
  - lamList
    Generates the list view.
  - lamListOption
    Represents a list configuration option.
  - lamListTool
    Represents a tool which can be included in the account lists.
  - lamMailAliasList
    Generates the list view.
  - lamNetgroupList
    Generates the list view.
  - lamSelectListOption
    Boolean option for list configuration.
  - lamSmbDomainList
    Generates the list view.
  - lamUserList
    Generates the list view.
- main
- metaHTML
  - htmlAccountPageButton
    Prints a button for the account pages.
  - htmlButton
    Simple button.
  - htmlDiv
    Creates a simple DIV element.
  - htmlElement
    Represents a HTML element.
  - htmlEqualHeight
    Sets all given elements to the same height.
  - htmlEqualWidth
    Sets all given elements to the same width.
  - htmlFieldset
    Generates a fieldset.
  - htmlGroup
    Groups multiple htmlElements.
  - htmlHelpLink
    Renders a help link.
  - htmlHiddenInput
    Generates a hidden input field.
  - htmlHorizontalLine
    Prints a horizontal line.
  - htmlImage
    Prints the HTML code for an image.
  - htmlInputCheckbox
    Prints the HTML code for a checkbox.
  - htmlInputField
    A standard input field.
  - htmlInputFileUpload
    Prints the HTML code for a file upload field.
  - htmlInputTextarea
    Prints the HTML code for a textarea.
  - htmlJavaScript
    Creates a JavaScript element.
  - htmlLink
    Generates a link.
  - htmlOutputText
    Prints the text and escapes contained HTML code by default.
  - htmlRadio
    Represents a radio selection.
  - htmlSelect
    Represents a select box.
  - htmlSortableList
    Creates a list of elements that can be sorted by the user via drag'n'drop.
  - htmlSpacer
    Adds an empty space with given width and height.
  - htmlStatusMessage
    Prints a status message (e.g. error message).
  - htmlSubTitle
    Generates a subtitle line. This is used to group multiple fields.
  - htmlTable
    Structures elements using a table.
  - htmlTableExtendedInputCheckbox
    Checkbox with descriptive label and help link.
  - htmlTableExtendedInputField
    An extended input field that combines label, input field and help.
  - htmlTableExtendedInputFileUpload
    File upload with descriptive label and help link.
  - htmlTableExtendedInputTextarea
    Text area with label and help link.
  - htmlTableExtendedRadio
    Radio list with descriptive label and help link.
  - htmlTableExtendedSelect
    Select with label and help link.
  - htmlTableRow
    A row inside a htmlTable.
  - htmlTitle
    Generates a title line. This is used for page titles.
- modules
  - account
    Manages the object class "account" for users and hosts.
  - accountContainer
    This class includes all modules and attributes of an account.
  - asteriskAccount
    Manages the Asterisk extension of user accounts.
  - asteriskExtension
    Manages Asterisk extensions.
  - asteriskVoicemail
    Manages the Asterisk extension of user accounts.
  - authorizedServiceObject
    Provides Authorized Service for accounts.
  - baseModule
    Parent class of all account modules.
  - ddns
    Manages DDNS entries.
  - dhcp_settings
    Manages DHCP entries.
  - eduPerson
    Manages the eduPerson extension for user accounts.
  - fixed_ip
    Manages DHCP host entries.
  - freeRadius
    Manages FreeRadius accounts.
  - generalInformation
    Shows general information like the creation time of an account.
  - hostObject
    Manages the hosts to which a user may login.
  - ieee802device
    Provides MAC addresses for hosts.
  - imapAccess
    Manages mailboxes on an IMAP server.
  - inetLocalMailRecipient
    Provides mail routing for users.
  - inetOrgPerson
    This module manages LDAP attributes of the object class inetOrgPerson (e.g. name and address).
  - kolabGroup
    Manages Kolab group accounts.
  - kolabUser
    Manages Kolab user accounts.
  - ldapPublicKey
    Manages SSH public keys.
  - nisMailAlias
    Provides NIS mail alias management.
  - nisnetgroup
    Manages entries based on the object class nisNetgroup.
  - passwordService
    This interface needs to be implemented by all account modules which manage passwords.
  - posixAccount
    Manages the object class "posixAccount" for users and hosts.
  - posixGroup
    Manages the object class "posixGroup" for groups.
  - puppetClient
    Manages Puppet configuration options.
  - quota
    Manages quotas for users and groups.
  - range
    Manages DHCP ranges for DHCP server.
  - samba3domain
    Represents a Samba 3 domain entry
  - sambaDomain
    Manages Samba 3 domain entries.
  - sambaGroupMapping
    Manages the object class "sambaGroupMapping" for groups.
  - sambaMungedDial
    Manages terminal server settings for Samba 3.
  - sambaSamAccount
    Manages the object class "sambaSamAccount" for users and hosts.
  - shadowAccount
    Manages the object class "shadowAccount" for users.
  - smbHash
    Calculates NT and LM hashes.
  - systemQuotas
    Manages user quotas with the object class systemQuotas.
  - windowsGroup
    Manages Windows AD (e.g. Samba 4) groups.
  - windowsHost
    Manages Windows AD (e.g. Samba 4) hosts.
  - windowsPosixGroup
    Manages Unix groups in Windows LDAP schema.
  - windowsUser
    Manages Windows AD (e.g. Samba 4) users.
- phpLDAPadmin
- profiles
- selfService
  - selfServiceProfile
    Includes all settings of a self service profile.
- tools
  - LAMSubTool
    Represents a subtool.
  - LAMTool
    Represents a tool.
  - toolFileUpload
    File upload
  - toolOUEditor
    OU editor
  - toolPDFEditor
    PDF editor
  - toolProfileEditor
    Profile editor
  - toolSchemaBrowser
    Schema browser
  - toolServerInformation
    Server information
  - toolTests
    Tests page
- types
  - asteriskExt
    The account type for Asterisk extensions.
  - baseType
    This is the parent class of all account types.
  - dhcp
    The account type for DHCP
  - group
    The account type for group accounts (e.g. Unix and Samba).
  - host
    The account type for host accounts (e.g. Samba).
  - mailAlias
    The account type for mail aliases.
  - netgroup
    The account type for NIS netgroups.
  - smbDomain
    The account type for Samba domains.
  - user
    The account type for user accounts (e.g. Unix, Samba and Kolab).