# LDAP Account Manager

# lib/types/user.inc

# Properties

author
package

## Description

The account type for user accounts (e.g. Unix, Samba and Kolab).

## Classes

### user

# Properties

Extends
Implements
package
types
Abstract
No
Final
No

#### Description

The account type for user accounts (e.g. Unix, Samba and Kolab).

#### Methods

__construct, buildAccountStatusDialogDiv, buildAccountStatusIcon, getAlias, getDefaultListAttributes, getDescription, getListAttributeDescriptions, getListClassName, getTitleBarSubtitle, getTitleBarTitle, runEditPagePostAction,

### __construct( ) : n/a

#### Description

Constructs a new user type object.

#### Return value

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

### buildAccountStatusDialogDiv( boolean $unixAvailable, boolean $unixLocked, boolean $sambaAvailable, boolean $sambaLocked, boolean $ppolicyAvailable, boolean $ppolicyLocked, boolean $windowsAvailable, boolean $windowsLocked, ) : n/a

#### Description

Builds the dialog to (un)lock parts of an account.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$unixAvailable | boolean | Unix part is active |
$unixLocked | boolean | Unix part is locked |
$sambaAvailable | boolean | Samba part is active |
$sambaLocked | boolean | Samba part is locked |
$ppolicyAvailable | boolean | PPolicy part is active |
$ppolicyLocked | boolean | PPolicy part is locked |
$windowsAvailable | boolean | Windows part is active |
$windowsLocked | boolean | Windows part is locked |

#### Return value

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

### buildAccountStatusIcon( \accountContainer $container, ) : String

#### Description

Builds the HTML code for the icon that shows the account status (locked/unlocked).

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$container | \accountContainer | account container |

#### Return value

Type | Description
--- | ---
String | HTML code for icon

### getAlias( ) : string

#### Description

Returns the alias name of this account type.

#### Return value

Type | Description
--- | ---
string | alias name

### getDefaultListAttributes( ) : string

#### Description

Returns the default attribute list for this account type.

#### Return value

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

### getDescription( ) : string

#### Description

Returns the description of this account type.

#### Return value

Type | Description
--- | ---
string | description

### getListAttributeDescriptions( ) : array

#### Description

Returns a list of attributes which have a translated description.
This is used for the head row in the list view.

#### Return value

Type | Description
--- | ---
array | list of descriptions

### getListClassName( ) : string

#### Description

Returns the class name for the list object.

#### Return value

Type | Description
--- | ---
string | class name

### getTitleBarSubtitle( \accountContainer $container, ) : String

#### Description

Returns the the title text for the title bar on the new/edit page.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$container | \accountContainer | account container |

#### Return value

Type | Description
--- | ---
String | title text

### getTitleBarTitle( \accountContainer $container, ) : String

#### Description

Returns the the title text for the title bar on the new/edit page.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$container | \accountContainer | account container |

#### Return value

Type | Description
--- | ---
String | title text

### runEditPagePostAction( \accountContainer $container, ) : n/a

#### Description

This function is called after the edit page is processed and before the page content is generated.
This can be used to run custom handlers after each page processing.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$container | \accountContainer | account container |

#### Return value

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

### lamUserList

# Properties

Extends
Implements
author
Roland Gruber
package
lists
Abstract
No
Final
No

#### Description

Generates the list view.

#### Methods

__construct, canBeFiltered, getAdditionalLDAPAttributesToRead, getAdditionalTools, injectAccountStatusAttribute, isPPolicyAvailable, isPPolicyLocked, isSambaAvailable, isSambaLocked, isUnixAvailable, isUnixLocked, isWindowsAvailable, isWindowsLocked, listConfigurationChanged, listGetAllConfigOptions, listGetAttributeDescriptionList, listGetParams, listPrintTableCellContent, listRefreshData, printAccountStatus, refreshPrimaryGroupTranslation,

### __construct( string $type, ) : \lamList

#### Description

Constructor

#### Arguments

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

#### Return value

Type | Description
--- | ---
\lamList | list object

### canBeFiltered( String $attr, ) : boolean

#### Description

Returns if the given attribute can be filtered.
If filtering is not possible then no filter box will be displayed.
The user list allows no filtering for account status.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$attr | String | attribute name |

#### Return value

Type | Description
--- | ---
boolean | filtering possible

### getAdditionalLDAPAttributesToRead( ) : array

#### Description

Returns a list of additional LDAP attributes that should be read.
This can be used to show additional data even if the user selected other attributes to show in the list.
The user list reads pwdAccountLockedTime, sambaAcctFlags and userPassword

#### Return value

Type | Description
--- | ---
array | additional attribute names

### getAdditionalTools( ) : \lamListTool[]

#### Description

Returns a list of lamListTool objects to display next to the edit/delete buttons.

#### Return value

Type | Description
--- | ---
\lamListTool[] | tools

### injectAccountStatusAttribute( ) : n/a

#### Description

Injects values for the virtual account status attribute to make it sortable.

#### Return value

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

### isPPolicyAvailable( array $attrs, ) : boolean

#### Description

Returns if the PPolicy part exists.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$attrs | array | LDAP attributes |

#### Return value

Type | Description
--- | ---
boolean | PPolicy part exists

### isPPolicyLocked( array $attrs, ) : boolean

#### Description

Returns if the PPolicy part is locked.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$attrs | array | LDAP attributes |

#### Return value

Type | Description
--- | ---
boolean | PPolicy part is locked

### isSambaAvailable( array $attrs, ) : boolean

#### Description

Returns if the Samba part exists.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$attrs | array | LDAP attributes |

#### Return value

Type | Description
--- | ---
boolean | Samba part exists

### isSambaLocked( array $attrs, ) : boolean

#### Description

Returns if the Samba part is locked.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$attrs | array | LDAP attributes |

#### Return value

Type | Description
--- | ---
boolean | Samba part is locked

### isUnixAvailable( array $attrs, ) : boolean

#### Description

Returns if the Unix part exists.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$attrs | array | LDAP attributes |

#### Return value

Type | Description
--- | ---
boolean | Unix part exists

### isUnixLocked( array $attrs, ) : boolean

#### Description

Returns if the Unix part is locked.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$attrs | array | LDAP attributes |

#### Return value

Type | Description
--- | ---
boolean | Unix part locked

### isWindowsAvailable( array $attrs, ) : boolean

#### Description

Returns if the Windows part exists.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$attrs | array | LDAP attributes |

#### Return value

Type | Description
--- | ---
boolean | Windows part exists

### isWindowsLocked( array $attrs, ) : boolean

#### Description

Returns if the Windows part is locked.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$attrs | array | LDAP attributes |

#### Return value

Type | Description
--- | ---
boolean | Windows part is locked

### listConfigurationChanged( ) : n/a

#### Description

Called when the configuration options changed.

#### Return value

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

### listGetAllConfigOptions( ) : array

#### Description

Returns a list of possible configuration options.

#### Return value

Type | Description
--- | ---
array | list of lamListOption objects

### listGetAttributeDescriptionList( ) : array

#### Description

Returns an hash array containing with all attributes to be shown and their descriptions.
Format: array(attribute => description)
The user list may display an additional account status column

#### Return value

Type | Description
--- | ---
array | attribute list

### listGetParams( ) : n/a

#### Description

Sets some internal parameters.

#### Return value

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

### listPrintTableCellContent( array $entry, string $attribute, ) : n/a

#### Description

Prints the content of a cell in the account list for a given LDAP entry and attribute.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$entry | array | LDAP attributes |
$attribute | string | attribute name |

#### Return value

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

### listRefreshData( ) : n/a

#### Description

Rereads the entries from LDAP.

#### Return value

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

### printAccountStatus( array $attrs, ) : n/a

#### Description

Prints the account status.

#### Arguments

Name | Type | Description | Default
--- | --- | --- | ---
$attrs | array | LDAP attributes |

#### Return value

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

### refreshPrimaryGroupTranslation( ) : n/a

#### Description

Refreshes the GID to group name cache.

#### Return value

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

#### Properties

$showAccountStatus, $trans_primary, $trans_primary_hash,

### private $showAccountStatus = false

Controls if the account status is shown

### private $trans_primary = false

Controls if GID number is translated to group name

### private $trans_primary_hash = array()

translates GID to group name

#### Constants

### ACCOUNT_STATUS_OPTION_NAME = "LU_AS"

ID for config option to show account status

### ATTR_ACCOUNT_STATUS = 'lam_virtual_account_status'

virtual attribute name for account status column

### TRANS_PRIMARY_OPTION_NAME = "LU_TP"

ID for config option to translate primary group GIDs to group names
Documentation was generated by phpDocumentor 2.1.0 .

# 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
  - kolabSharedFolderTypeList
    Generates the list view.
  - 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.
  - lamPykotaBillingCodeTypeList
    Generates the list view.
  - lamPykotaPrinterTypeList
    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.
  - kolabSharedFolder
    Manages Kolab shared folders.
  - 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.
  - pykotaBillingCode
    Manages PyKota billing codes.
  - pykotaGroup
    Manages PyKota group accounts.
  - pykotaGroupStructural
    Manages PyKota group accounts.
  - pykotaPrinter
    Manages PyKota printers.
  - pykotaUser
    Manages PyKota user accounts.
  - pykotaUserStructural
    Manages PyKota user accounts.
  - 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
  - toolMultiEdit
    Multi edit tool that allows LDAP operations on multiple entries.
  - 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).
  - kolabSharedFolderType
    The account type for Kolab shared folders.
  - mailAlias
    The account type for mail aliases.
  - netgroup
    The account type for NIS netgroups.
  - pykotaBillingCodeType
    The account type for PyKota billing codes.
  - pykotaPrinterType
    The account type for PyKota printers.
  - smbDomain
    The account type for Samba domains.
  - user
    The account type for user accounts (e.g. Unix, Samba and Kolab).