modules

# Class: baseModule

Source Location: /lib/baseModule.inc

### Class Overview

Parent class of all account modules.

#### Author(s):

- Roland Gruber

### Variables

- $attributes
- $autoAddObjectClasses
- $messages
- $meta
- $moduleSettings
- $orig
- $selfServiceSettings

### Methods

- __construct
- build_uploadAccounts
- can_manage
- checkSelfServiceOptions
- checkSelfServiceSettings
- check_configOptions
- check_profileOptions
- delete_attributes
- display_html_attributes
- display_html_delete
- doUploadPostActions
- getAccountContainer
- getAttributes
- getButtonStatus
- getIcon
- getLDAPAliases
- getManagedAttributes
- getManagedObjectClasses
- getOriginalAttributes
- getRequiredExtensions
- getSelfServiceFields
- getSelfServiceOptions
- getSelfServiceSearchAttributes
- getSelfServiceSettings
- get_alias
- get_configOptions
- get_dependencies
- get_help
- get_ldap_filter
- get_metaData
- get_pdfEntries
- get_pdfFields
- get_profileOptions
- get_RDNAttributes
- get_scope
- get_uploadColumns
- get_uploadPreDepends
- init
- isBooleanConfigOptionSet
- is_base_module
- load_attributes
- load_Messages
- load_profile
- module_complete
- module_ready
- postDeleteActions
- postModifyActions
- postModifySelfService
- preDeleteActions
- preModifyActions
- preModifySelfService
- process_attributes
- save_attributes

### Child classes:

phpGroupwareGroup
  Manages phpGroupware groups.

asteriskAccount
  Manages the Asterisk extension of user accounts.

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

ieee802Device
  Provides MAC addresses for hosts.

posixGroup
  Manages the object class "posixGroup" for groups.

dhcp_settings
  Manages DHCP entries.

eduPerson
  Manages the eduPerson extension for user accounts.

quota
  Manages quotas for users and groups.

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

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

kolabUser
  Manages Kolab user accounts.

phpGroupwareUser
  Manages phpGroupware users.

range
  Manages DHCP ranges for DHCP server.

ddns
  Manages DDNS entries.

sambaGroupMapping
  Manages the object class "sambaGroupMapping" for groups.

shadowAccount
  Manages the object class "shadowAccount" for users.

ldapPublicKey
  Manages SSH public keys.

nisnetgroup
  Manages entries based on the object class nisNetgroup.

sambaDomain
  Manages Samba 3 domain entries.

inetOrgPerson
  This module manages LDAP attributes of the object class inetOrgPerson (e.g. name and address).

asteriskExtension
  Manages Asterisk extensions.

asteriskVoicemail
  Manages the Asterisk extension of user accounts.

inetLocalMailRecipient
  Provides mail routing for users.

fixed_ip
  Manages fixed IP addresses.

nisMailAlias
  Provides NIS mail alias management.

hostObject
  Manages the hosts to which a user may login.

### Class Details

[line 53]
Parent class of all account modules.

It implements the complete module interface and uses meta-data provided by the account modules for its functions.
Location and naming of modules
All LAM modules are placed in lib/modules/ and are named "<class name>.inc". E.g. if you create a new module and its class name is "qmail" then the filename would be "qmail.inc". The class name of a module must contain only a-z, A-Z, 0-9, -, and _.
You can avoid to override many functions by using get_metaData().
All module classes should extend the baseModule class.

#### Tags:

author: | Roland Gruber
abstract: |

[ Top ]

### Class Variables

#### $attributes =

[line 71]

contains all ldap attributes which should be written

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $autoAddObjectClasses =

[line 80]

if true, managed object classes are added when an account is created or loaded (default: true)

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $messages =

[line 77]

contains all error messages of a module

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $meta =

[line 56]

includes all meta data provided by the sub class

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $moduleSettings =

[line 62]

configuration settings of all modules

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $orig =

[line 74]

contains all ldap attributes which are loaded from ldap

#### Tags:

access: | protected

Type: | mixed

[ Top ]

#### $selfServiceSettings =

[line 65]

self service settings of all modules

#### Tags:

access: | protected

Type: | mixed

[ Top ]

### Class Methods

### constructor __construct [line 87]

`baseModule __construct( string $scope)`

Creates a new base module class

#### Tags:

access: | public

Overridden in child classes as:

phpGroupwareGroup::__construct()
  Creates a new kolabUser object.

asteriskAccount::__construct()
  Creates a new asteriskAccount object.

dhcp_settings::__construct()
  Creates a new dhcp_settings object.

eduPerson::__construct()
  Creates a new eduPerson object.

sambaSamAccount::__construct()
  Creates a new sambaSamAccount object.

kolabUser::__construct()
  Creates a new kolabUser object.

phpGroupwareUser::__construct()
  Creates a new kolabUser object.

sambaGroupMapping::__construct()
  Creates a new module for Samba 3 groups.

shadowAccount::__construct()
  Creates a new shadowAccount object.

asteriskVoicemail::__construct()
  Creates a new asteriskVoicemail object.

hostObject::__construct()
  Creates a new hostObject object.

#### Parameters:

string | $scope | the account type (user, group, host)

[ Top ]

### method build_uploadAccounts [line 886]

`array build_uploadAccounts( array $rawAccounts, array $ids, &$partialAccounts, array $selectedModules, array $partialAccounts)`

In this function the LDAP accounts are built.

Calling this method does not require the existence of an enclosing accountContainer.
Returns an array which contains subarrays to generate StatusMessages if any errors occured.

#### Tags:

return: | list of error messages if any
access: | public

Overridden in child classes as:

phpGroupwareGroup::build_uploadAccounts()
  In this function the LDAP account is built up.

asteriskAccount::build_uploadAccounts()
  In this function the LDAP account is built up.

account::build_uploadAccounts()
  In this function the LDAP account is built up.

ieee802Device::build_uploadAccounts()
  In this function the LDAP account is built up.

posixGroup::build_uploadAccounts()
  In this function the LDAP account is built up.

dhcp_settings::build_uploadAccounts()
  In this function the LDAP account is built up.

eduPerson::build_uploadAccounts()
  In this function the LDAP account is built up.

sambaSamAccount::build_uploadAccounts()
  In this function the LDAP account is built up.

posixAccount::build_uploadAccounts()
  In this function the LDAP account is built up.

kolabUser::build_uploadAccounts()
  In this function the LDAP account is built up.

phpGroupwareUser::build_uploadAccounts()
  In this function the LDAP account is built up.

ddns::build_uploadAccounts()
  In this function the LDAP account is built up.

sambaGroupMapping::build_uploadAccounts()
  In this function the LDAP account is built up.

shadowAccount::build_uploadAccounts()
  In this function the LDAP account is built up.

ldapPublicKey::build_uploadAccounts()
  In this function the LDAP account is built up.

nisnetgroup::build_uploadAccounts()
  In this function the LDAP account is built up.

sambaDomain::build_uploadAccounts()
  In this function the LDAP account is built up.

inetOrgPerson::build_uploadAccounts()
  In this function the LDAP account is built up.

asteriskExtension::build_uploadAccounts()
  In this function the LDAP account is built up.

asteriskVoicemail::build_uploadAccounts()
  In this function the LDAP account is built up.

inetLocalMailRecipient::build_uploadAccounts()
  In this function the LDAP account is built up.

nisMailAlias::build_uploadAccounts()
  In this function the LDAP account is built up.

hostObject::build_uploadAccounts()
  In this function the LDAP account is built up.

#### Parameters:

array | $rawAccounts | the user input data, contains one subarray for each account.
array | $partialAccounts | list of hash arrays (name => value) which are later added to LDAP
array | $ids | list of IDs for column position (e.g. "posixAccount_uid" => 5)
array | $selectedModules | list of selected account modules
| &$partialAccounts |

[ Top ]

### method can_manage [line 398]

`boolean can_manage( )`

Returns true if this module can manage accounts of the current type, otherwise false.

Calling this method does not require the existence of an enclosing accountContainer.

#### Tags:

return: | true if module fits
see: | baseModule::get_metaData()
access: | public

[ Top ]

### method checkSelfServiceOptions [line 1249]

`array checkSelfServiceOptions( string $fields, array $attributes)`

Checks if all input values are correct and returns the LDAP attributes which should be changed.

Calling this method does not require the existence of an enclosing accountContainer.

#### Tags:

return: | messages and attributes (array('messages' => array(), 'add' => array('mail' => array('test@test.com')), 'del' => array(), 'mod' => array()))
access: | public

Overridden in child classes as:

asteriskAccount::checkSelfServiceOptions()
  Checks if all input values are correct and returns the LDAP commands which should be executed.

sambaSamAccount::checkSelfServiceOptions()
  Checks if all input values are correct and returns the LDAP commands which should be executed.

posixAccount::checkSelfServiceOptions()
  Checks if all input values are correct and returns the LDAP commands which should be executed.

kolabUser::checkSelfServiceOptions()
  Checks if all input values are correct and returns the LDAP commands which should be executed.

inetOrgPerson::checkSelfServiceOptions()
  Checks if all input values are correct and returns the LDAP commands which should be executed.

asteriskVoicemail::checkSelfServiceOptions()
  Checks if all input values are correct and returns the LDAP commands which should be executed.

#### Parameters:

string | $fields | input fields
array | $attributes | LDAP attributes

[ Top ]

### method checkSelfServiceSettings [line 1289]

`array checkSelfServiceSettings( array $options)`

Checks if the self service settings are valid.

Calling this method does not require the existence of an enclosing accountContainer.
If the input data is invalid the return value is an array that contains arrays to build StatusMessages (message type, message head, message text). If no errors occured the function returns an empty array.

#### Tags:

return: | error messages
access: | public

#### Parameters:

array | $options | hash array (option name => value) that contains the input. The option values are all arrays containing one or more elements.

[ Top ]

### method check_configOptions [line 691]

`array check_configOptions( array $scopes, array $options)`

Checks input values of module settings.

Calling this method does not require the existence of an enclosing accountContainer.
If the input data is invalid the return value is an array that contains subarrays to build StatusMessages ('message type', 'message head', 'message text').
If no errors occured the function returns an empty array.

#### Tags:

return: | list of error messages
see: | baseModule::get_metaData()
access: | public

Overridden in child classes as:

posixAccount::check_configOptions()
  Checks input values of module settings.

#### Parameters:

array | $scopes | list of account types which are used
array | $options | hash array (option name => value) that contains the input. The option values are all arrays containing one or more elements.

[ Top ]

### method check_profileOptions [line 537]

`array check_profileOptions( array $options)`

Checks input values of account profiles.

Calling this method does not require the existence of an enclosing accountContainer.
$options is an hash array (option name => value) that contains the user input. The option values are all arrays containing one or more elements.
If the input data is invalid the return value is an array that contains arrays to build StatusMessages (message type, message head, message text). If no errors occured the function returns an empty array.

#### Tags:

return: | list of error messages (array(type, title, text)) to generate StatusMessages, if any
see: | baseModule::get_metaData()
access: | public

Overridden in child classes as:

quota::check_profileOptions()
  Checks input values of account profiles.

#### Parameters:

array | $options | a hash array (name => value) containing the user input

[ Top ]

### method delete_attributes [line 1088]

`List delete_attributes( )`

This function returns an array with the same syntax as save_attributes().

Calling this method requires the existence of an enclosing accountContainer.
It allows additional LDAP changes when an account is deleted.

#### Tags:

return: | of LDAP operations, same as for save_attributes()
access: | public

Overridden in child classes as:

posixGroup::delete_attributes()
  Checks if the group which should be deleted is still used as primary group.

posixAccount::delete_attributes()
  Additional LDAP operations on delete.

[ Top ]

### method display_html_attributes [line 1129]

`htmlElement display_html_attributes( )`

This function creates meta HTML code to display the module page.

Calling this method requires the existence of an enclosing accountContainer.

#### Tags:

return: | meta HTML object
see: | htmlElement
abstract: |
access: | public

Overridden in child classes as:

phpGroupwareGroup::display_html_attributes()
  Returns the HTML meta data for the main account page.

asteriskAccount::display_html_attributes()
  Returns the HTML meta data for the main account page.

account::display_html_attributes()
  Returns the HTML meta data for the main account page.

ieee802Device::display_html_attributes()
  Returns the HTML meta data for the main account page.

posixGroup::display_html_attributes()
  Returns the HTML meta data for the main account page.

dhcp_settings::display_html_attributes()
  Returns the HTML meta data for the main account page.

eduPerson::display_html_attributes()
  Returns the HTML meta data for the main account page.

quota::display_html_attributes()
  Returns the HTML meta data for the main account page.

sambaSamAccount::display_html_attributes()
  Returns the HTML meta data for the main account page.

posixAccount::display_html_attributes()
  Returns the HTML meta data for the main account page.

kolabUser::display_html_attributes()
  Returns the HTML meta data for the main account page.

phpGroupwareUser::display_html_attributes()
  Returns the HTML meta data for the main account page.

range::display_html_attributes()
  Returns the HTML meta data for the main account page.

ddns::display_html_attributes()
  Returns the HTML meta data for the main account page.

sambaGroupMapping::display_html_attributes()
  Returns the HTML meta data for the main account page.

shadowAccount::display_html_attributes()
  This function will create the meta HTML code to show a page with all attributes.

ldapPublicKey::display_html_attributes()
  Returns the HTML meta data for the main account page.

nisnetgroup::display_html_attributes()
  Returns the HTML meta data for the main account page.

sambaDomain::display_html_attributes()
  Returns the HTML meta data for the main account page.

inetOrgPerson::display_html_attributes()
  Returns the HTML meta data for the main account page.

asteriskExtension::display_html_attributes()
  This function will create the meta HTML code to show a page with all attributes.

asteriskVoicemail::display_html_attributes()
  Returns the HTML meta data for the main account page.

inetLocalMailRecipient::display_html_attributes()
  Returns the HTML meta data for the main account page.

fixed_ip::display_html_attributes()
  Returns the HTML meta data for the main account page.

nisMailAlias::display_html_attributes()
  Returns the HTML meta data for the main account page.

hostObject::display_html_attributes()
  Returns the HTML meta data for the main account page.

[ Top ]

### method display_html_delete [line 1103]

`htmlElement display_html_delete( )`

This function creates meta HTML code which will be displayed when an account should be deleted.

Calling this method requires the existence of an enclosing accountContainer.
This can be used to interact with the user, e.g. should the home directory be deleted? The output of all modules is displayed on a single page.

#### Tags:

return: | meta HTML object
see: | htmlElement
access: | public

Overridden in child classes as:

posixAccount::display_html_delete()
  Displays the delete homedir option for the delete page.

[ Top ]

### method doUploadPostActions [line 999]

`array doUploadPostActions( array $data, array $ids, array $failed, &$temp, array $temp)`

This function is responsible to do additional tasks after the account has been created in LDAP (e.g. modifying group memberships, adding Quota etc..).

Calling this method does not require the existence of an enclosing accountContainer.
This function is called as long as the returned status is 'finished'. Please make sure that one function call lasts no longer than 3-4 seconds. Otherwise the upload may fail because the time limit is exceeded. You should not make more than one LDAP operation in each call.

#### Tags:

return: | current status array ( 'status' => 'finished' | 'inProgress' // defines if all operations are complete 'progress' => 0..100 // the progress of the operations in percent 'errors' => array // list of arrays which are used to generate StatusMessages )
access: | public

Overridden in child classes as:

quota::doUploadPostActions()
  This function executes one post upload action.

posixAccount::doUploadPostActions()
  This function executes one post upload action.

#### Parameters:

array | $data | array containing one account in each element
array | $ids | maps the column names to keys for the sub arrays (array(<column_name> => <column number>))
array | $failed | list of account numbers which could not be successfully uploaded to LDAP
array | $temp | variable to store temporary data between two post actions
| &$temp |

[ Top ]

### method getAccountContainer [line 1323]

`accountContainer getAccountContainer( )`

Returns the accountContainer object.

#### Tags:

return: | accountContainer object
see: | accountContainer
access: | protected

[ Top ]

### method getAttributes [line 1337]

`array getAttributes( )`

Returns the LDAP attributes which are managed in this module.

#### Tags:

return: | attributes
access: | public

[ Top ]

### method getButtonStatus [line 974]

`string getButtonStatus( )`

Controls if the module button the account page is visible and activated.

Calling this method requires the existence of an enclosing accountContainer.
Possible return values:

- enabled: button is visible and active
- disabled: button is visible and deactivated (greyed)
- hidden: no button will be shown

#### Tags:

return: | status ("enabled", "disabled", "hidden")
access: | public

Overridden in child classes as:

account::getButtonStatus()
  Controls if the module button the account page is visible and activated.

posixGroup::getButtonStatus()
  Controls if the module button the account page is visible and activated.

range::getButtonStatus()
  Controls if the module button the account page is visible and activated.

inetOrgPerson::getButtonStatus()
  Controls if the module button the account page is visible and activated.

fixed_ip::getButtonStatus()
  Controls if the module button the account page is visible and activated.

nisMailAlias::getButtonStatus()
  Controls if the module button the account page is visible and activated.

[ Top ]

### method getIcon [line 1359]

`unknown getIcon( )`

Returns the path to the module icon.

The path must be releative to graphics (e.g. key.png). You can also set $this->meta['icon']. The preferred size is 32x32px.

#### Tags:

see: | baseModule::get_metaData()
access: | public

[ Top ]

### method getLDAPAliases [line 1160]

`array getLDAPAliases( )`

Returns a list of aliases for LDAP attributes.

Calling this method does not require the existence of an enclosing accountContainer.
All alias attributes will be renamed to the given attribute names.

#### Tags:

return: | list of aliases like array("alias name" => "attribute name")
see: | baseModule::get_metaData()
access: | public

[ Top ]

### method getManagedAttributes [line 1173]

`array getManagedAttributes( )`

Returns a list of LDAP attributes which are managed by this module.

All attribute names will be renamed to match the given spelling.

#### Tags:

return: | list of attributes
see: | baseModule::get_metaData()
access: | public

[ Top ]

### method getManagedObjectClasses [line 1144]

`array getManagedObjectClasses( )`

Returns a list of managed object classes for this module.

Calling this method does not require the existence of an enclosing accountContainer.
This is used to fix spelling errors in LDAP-Entries (e.g. if "posixACCOUNT" is read instead of "posixAccount" from LDAP).
Example: return array('posixAccount')

#### Tags:

return: | list of object classes
see: | baseModule::get_metaData()
access: | public

[ Top ]

### method getOriginalAttributes [line 1346]

`array getOriginalAttributes( )`

Returns the LDAP attributes which are managed in this module (with unchanged values).

#### Tags:

return: | attributes
access: | public

[ Top ]

### method getRequiredExtensions [line 1187]

`array getRequiredExtensions( )`

This function returns a list of PHP extensions (e.g. hash) which are needed by this module.

Calling this method does not require the existence of an enclosing accountContainer.

#### Tags:

return: | extensions
see: | baseModule::get_metaData()
access: | public

[ Top ]

### method getSelfServiceFields [line 1217]

`array getSelfServiceFields( )`

Returns a list of possible input fields and their descriptions.

Calling this method does not require the existence of an enclosing accountContainer.
Format: array(<field identifier> => <field description>)

#### Tags:

return: | fields
see: | baseModule::get_metaData()
access: | public

[ Top ]

### method getSelfServiceOptions [line 1235]

`htmlElement getSelfServiceOptions( array $fields, array $attributes)`

Returns the meta HTML code for each input field.

Calling this method does not require the existence of an enclosing accountContainer.
It is not possible to display help links.

#### Tags:

return: | meta HTML object
see: | htmlElement
access: | public

Overridden in child classes as:

posixAccount::getSelfServiceOptions()
  Returns the meta HTML code for each input field.

kolabUser::getSelfServiceOptions()
  Returns the meta HTML code for each input field.

inetOrgPerson::getSelfServiceOptions()
  Returns the meta HTML code for each input field.

#### Parameters:

array | $fields | list of active fields
array | $attributes | attributes of LDAP account (attribute names in lower case)

[ Top ]

### method getSelfServiceSearchAttributes [line 1201]

`array getSelfServiceSearchAttributes( )`

This function returns a list of possible LDAP attributes (e.g. uid, cn, ...) which can be used to search for LDAP objects.

Calling this method does not require the existence of an enclosing accountContainer.

#### Tags:

return: | attributes
see: | baseModule::get_metaData()
access: | public

[ Top ]

### method getSelfServiceSettings [line 1268]

`htmlElement getSelfServiceSettings( )`

Returns a list of self service configuration settings.

Calling this method does not require the existence of an enclosing accountContainer.
The name attributes are used as keywords to load and save settings. We recommend to use the module name as prefix for them (e.g. posixAccount_homeDirectory) to avoid naming conflicts.

#### Tags:

return: | meta HTML object
see: | baseModule::get_metaData()
see: | htmlElement
access: | public

[ Top ]

### method get_alias [line 453]

`string get_alias( )`

Returns an alias name for the module.

Calling this method does not require the existence of an enclosing accountContainer.
This function returns a more descriptive string than the class name. Alias names are used for the buttons on the account pages and the module selection in the configuration wizard.
Please take care that your alias name is not too long. It may contain any character but should not include parts that may be interpreted by the browser (e.g. '<' or '>'). If you use different aliases dependent on the account type please make sure that there is a general alias for unknown types.

#### Tags:

return: | alias name
see: | baseModule::get_metaData()
access: | public

[ Top ]

### method get_configOptions [line 648]

`mixed get_configOptions( array $scopes, array $allScopes)`

Returns a list of configuration options.

Calling this method does not require the existence of an enclosing accountContainer.
The field names are used as keywords to load and save settings. We recommend to use the module name as prefix for them (e.g. posixAccount_homeDirectory) to avoid naming conflicts.

#### Tags:

return: | htmlElement or array of htmlElement
see: | baseModule::get_metaData()
see: | htmlElement
access: | public

Overridden in child classes as:

posixGroup::get_configOptions()
  Returns a list of elements for the configuration.

#### Parameters:

array | $scopes | account types (user, group, host)
array | $allScopes | list of all active account modules and their scopes (module => array(scopes))

[ Top ]

### method get_dependencies [line 496]

`array get_dependencies( )`

This function returns a list with all depending and conflicting modules.

Calling this method does not require the existence of an enclosing accountContainer.
The return value is an array with two sub arrays, "depends" and "conflicts". All values of the conflict array are string values with module names. All values of the depends array are either string values with module names or arrays which include only string values with module names.
If an element of the depends array is itself an array, this means that your module depends on one of these modules.
Example: return array("depends" => array("posixAccount", array("qmail", "sendmail")), "conflicts" => array("exim"))

#### Tags:

return: | list of dependencies and conflicts
see: | baseModule::get_metaData()
access: | public

[ Top ]

### method get_help [line 916]

`array get_help( string $id)`

This function returns the help entry array for a specific help id.

Calling this method does not require the existence of an enclosing accountContainer.
The result is an hashtable with the following keys:

- Headline (required)
  The headline of this help entry. Can consist of any alpha-numeric characters. No HTML/CSS elements are allowed.
- Text (required)
  The text of the help entry which may contain any alpha-numeric characters.
- SeeAlso (optional)
  A reference to anonther related web site. It must be an array containing a field called "text" with the link text that should be displayed and a field called "link" which is the link target.

Example:
array('Headline' => 'This is the head line', 'Text' => 'Help content', 'SeeAlso' => array('text' => 'LAM homepage', 'link' => 'http://www.ldap-account-manager.org/'))

#### Tags:

return: | The desired help entry.
see: | baseModule::get_metaData()
access: | public

#### Parameters:

string | $id | The id string for the help entry needed.

[ Top ]

### method get_ldap_filter [line 435]

`string get_ldap_filter( )`

Returns an LDAP filter for the account lists

Calling this method does not require the existence of an enclosing accountContainer.
Returns an array('or' => '...', 'and' => '...') that is used to build the LDAP filter. Usually, this is used to filter object classes. All "or" filter parts of the base modules are combined with OR and then combined with the "and" parts.
The resulting LDAP filter will look like this: (&(|(OR1)(OR2)(OR3))(AND1)(AND2)(AND3))
Example: return array('or' => '(objectClass=posixAccount)', 'and' => '(!(uid=*$))')

#### Tags:

return: | LDAP filter
see: | baseModule::get_metaData()
access: | public

[ Top ]

### method get_metaData [line 376]

`array get_metaData( )`

This function provides meta data which is interpreted by baseModule.

Only subclasses will return real data.
The aim of the meta data is to reduce the number of functions in the subclasses. All major data is centralized in one place.
The returned array contains a list of key-value pairs for the different functions.

- can_manage()
  Key: account_types
  Value: array of account types
  Example: "account_types" => array("user", "host")
- is_base_module()
  Key: is_base
  Value: boolean
  Example: "is_base" => true
- get_ldap_filter()
  Key: ldap_filter
  Value: array of filters
  Example: "ldap_filter" => array('or' => 'objectClass=posixAccount', 'and' => '(!(uid=*$))')
- getManagedObjectClasses()
  Key: objectClasses
  Value: array of object classes
  Example: "objectClasses" => array('posixAccount')
- getLDAPAliases()
  Key: LDAPaliases
  Value: array of aliases
  Example: "LDAPaliases" => array('commonName' => 'cn')
- get_RDNAttributes()
  Key: RDN
  Value: array of RDNs
  Example: "RDN" => array('uid' => 'normal', 'cn' => 'low')
- get_dependencies()
  Key: dependencies
  Value: array of dependencies
  Example: "dependencies" => array("depends" => array("posixAccount", array("qmail", "sendmail")), "conflicts" => array("exim"))
- get_profileOptions()
  Key: profile_options
  Value: array of profile options
  The syntax for the value array is the same as for the return value of get_profileOptions().
- check_profileOptions()
  Key: profile_checks
  Value: array of checks (array("optionName" => array()))
  The "optionName" keys of the value array are the names of the option identifiers.
  Each array element is an array itself containing these values:
  - type: determines how to check input
    Possible values:
    - regex: check with regular expression from regex variable, case sensitive
    - regex_i: check with regular expression from regex variable, case insensitive
    - int_greater: integer value of cmp_name1 must be greater than the integer value from the option cmp_name2
    - int_greaterOrEqual: integer value of cmp_name1 must be greater or equal than the integer value from the option cmp_name2
  - error_message: message that is displayed if input value was syntactically incorrect
    error_message is an array to build StatusMessages (message type, message head, message text, additional variables)
  - regex: regular expression string (only if type is regex/regex_i)
  - cmp_name1: name of first input variable that is used for comparison (only if type is int_greater/int_greaterOrEqual)
  - cmp_name2: name of second input variable that is used for comparison (only if type is int_greater/int_greaterOrEqual)
  - required: true or false, if this input field must be filled set to true (optional)
  - required_message: message that is displayed if no input value was given (only if required == true)
    required_message is an array to build StatusMessages (message type, message head, message text, additional variables)
- load_profile()
  Key: profile_mappings
  Value: array('profile_identifier1' => 'LDAP_attribute1', 'profile_identifier2' => 'LDAP_attribute2')
  The mapped values are stored directly in $this->attributes.
  Example: "profile_mappings" => array('inetOrgPerson_title' => 'title')
- get_configOptions()
  Key: config_options
  Value: array('user' => array, 'host' => array, 'all' => array)
  The values from 'all' are always returned, the other values only if they are inside the $scopes array.
  The syntax for sub arrays is the same as for the return value of get_configOptions().
- check_configOptions()
  Key: config_checks
  Value: array('user' => array, 'host' => 'array', 'all' => array)
  The values from 'all' are always used for checking, the other values only if they are inside the $scopes array. The syntax for sub arrays is the same as for check_configOptions().
- get_uploadColumns()
  Key: upload_columns
  Value: array
  The syntax for array is the same as for the return value of get_uploadColumns().
- get_uploadPreDepends()
  Key: upload_preDepends
  Value: array
  The syntax for array is the same as for the return value of get_uploadPreDepends().
- getRequiredExtensions()
  Key: extensions
  Value: array of extension names
  Example: "extensions" => array('hash')
- get_help()
  Key: help
  Value: hashtable of help entries
  The hashtable is an array which maps help IDs to help entries.
  Example: 'help' => array('myEntry' => array('Headline' => 'This is the head line', 'Text' => 'Help content'))
- getSelfServiceSearchAttributes()
  Key: selfServiceSearchAttributes
  Value: array of attribute names
  Example: "selfServiceSearchAttributes" => array('uid')
- getSelfServiceFields()
  Key: selfServiceFieldSettings
  Value: array of self service fields
  Example: "selfServiceFieldSettings" => array('pwd' => 'Password')

Example: return array("is_base" => true);

#### Tags:

return: | meta data
access: | public

Overridden in child classes as:

phpGroupwareGroup::get_metaData()
  Returns meta data that is interpreted by parent class

asteriskAccount::get_metaData()
  Returns meta data that is interpreted by parent class.

account::get_metaData()
  Returns meta data that is interpreted by parent class

ieee802Device::get_metaData()
  Returns meta data that is interpreted by parent class

posixGroup::get_metaData()
  Returns meta data that is interpreted by parent class

dhcp_settings::get_metaData()
  Returns meta data that is interpreted by parent class

eduPerson::get_metaData()
  Returns meta data that is interpreted by parent class

quota::get_metaData()
  Returns meta data that is interpreted by parent class

sambaSamAccount::get_metaData()
  Returns meta data that is interpreted by parent class

posixAccount::get_metaData()
  Returns meta data that is interpreted by parent class

kolabUser::get_metaData()
  Returns meta data that is interpreted by parent class

phpGroupwareUser::get_metaData()
  Returns meta data that is interpreted by parent class

range::get_metaData()
  Returns meta data that is interpreted by parent class

ddns::get_metaData()
  Returns meta data that is interpreted by parent class.

sambaGroupMapping::get_metaData()
  Returns meta data that is interpreted by parent class

shadowAccount::get_metaData()
  Returns meta data that is interpreted by parent class

ldapPublicKey::get_metaData()
  Returns meta data that is interpreted by parent class

nisnetgroup::get_metaData()
  Returns meta data that is interpreted by parent class

sambaDomain::get_metaData()
  Returns meta data that is interpreted by parent class

inetOrgPerson::get_metaData()
  Returns meta data that is interpreted by parent class

asteriskExtension::get_metaData()
  Returns meta data that is interpreted by parent class

asteriskVoicemail::get_metaData()
  Returns meta data that is interpreted by parent class

inetLocalMailRecipient::get_metaData()
  Returns meta data that is interpreted by parent class

fixed_ip::get_metaData()
  Returns meta data that is interpreted by parent class

nisMailAlias::get_metaData()
  Returns meta data that is interpreted by parent class

hostObject::get_metaData()
  Returns meta data that is interpreted by parent class

[ Top ]

### method get_pdfEntries [line 824]

`array get_pdfEntries( )`

Returns the PDF entries for this module.

#### Tags:

return: | list of possible PDF entries
access: | public

Overridden in child classes as:

asteriskAccount::get_pdfEntries()
  Returns a list of PDF entries

account::get_pdfEntries()
  Returns the PDF entries for this module.

ieee802Device::get_pdfEntries()
  Returns the PDF entries for this module.

posixGroup::get_pdfEntries()
  Returns the PDF entries for this module.

dhcp_settings::get_pdfEntries()
  Returns the PDF entries for this module.

eduPerson::get_pdfEntries()
  Returns the PDF entries for this module.

quota::get_pdfEntries()
  Returns the PDF entries for this module.

sambaSamAccount::get_pdfEntries()
  Returns the PDF entries for this module.

posixAccount::get_pdfEntries()
  Returns the PDF entries for this module.

kolabUser::get_pdfEntries()
  Returns the PDF entries for this module.

phpGroupwareUser::get_pdfEntries()
  Returns the PDF entries for this module.

range::get_pdfEntries()
  Returns the PDF entries for this module.

ddns::get_pdfEntries()
  Returns the PDF entries for this module.

sambaGroupMapping::get_pdfEntries()
  Returns the PDF entries for this module.

shadowAccount::get_pdfEntries()
  Returns the PDF entries for this module.

ldapPublicKey::get_pdfEntries()
  Returns a list of PDF entries

nisnetgroup::get_pdfEntries()
  Returns a list of PDF entries

sambaDomain::get_pdfEntries()
  Returns the PDF entries for this module.

inetOrgPerson::get_pdfEntries()
  Returns the PDF entries for this module.

asteriskExtension::get_pdfEntries()
  Returns a list of PDF entries

asteriskVoicemail::get_pdfEntries()
  Returns a list of PDF entries

inetLocalMailRecipient::get_pdfEntries()
  Returns the PDF entries for this module.

fixed_ip::get_pdfEntries()
  Returns the PDF entries for this module.

nisMailAlias::get_pdfEntries()
  Returns the PDF entries for this module.

hostObject::get_pdfEntries()
  Returns the PDF entries for this module.

[ Top ]

### method get_pdfFields [line 815]

`array get_pdfFields( string $scope)`

Returns a hashtable with all entries that may be printed out in the PDF.

Calling this method does not require the existence of an enclosing accountContainer.
This method must be overwritten in case that there are non static values to be returned. The $this->meta['PDF_fields'] array may be used for static content.
Format of returned hashtable:
This function uses XML formatted commands to define the PDF output. Each part in the PDF document is surrounded by "<block>" and "</block>".
Inside the <block> tags there are different ways to format the output:

- simple line with attribute name and value: <block><key>attribute name</key><value>attribute value</value></block>
- table: <block><key>attribute name</key><tr><td>value<td><td>value<td></tr></block><block><tr><td>value</td><td>value<td></tr></block>

Special commands:

- Alignment in <td>: You can specify the alignment in <td> tags with align=(L|R|C) (e.g. <td align=\"L\">)
- Cell width: <td> allows an attribute "width" to set the cell width (e.g. <td width=20%> or <td width=30>).
- Line breaks: Line breaks can be specified by adding a <br> tag. The new line will start at the left border of the PDF document.

Examples:
Simple name+value lines:
In most cases you will just want to display a single line per attribute with its name and value.
'myAttribute' => '<block><key>AttrName</key><value>12345</value></block>'
This will give the following PDF output:
Attribute name: 12345
Multiline values:
Sometimes you have multivalued attributes where it is not applicable to write all values in one line but where you want to list your values one below the other or show a table. This can be done by using the <td> tag.
This example only uses one column but you can just use more <td> tags per <block> tag to display more columns.
'myAttribute' => '<block><key>AttrName</key><tr><td align=\"L\">123</td></tr></block><block><tr><td align=\"L\">456</td></tr></block><block><tr><td align=\"L\">789</td></tr></block>'

#### Tags:

return: | PDF entries
see: | baseModule::get_metaData()
access: | public

#### Parameters:

string | $scope | account type

[ Top ]

### method get_profileOptions [line 516]

`htmlElement get_profileOptions( )`

This function defines what attributes will be used in the account profiles and their appearance in the profile editor.

Calling this method does not require the existence of an enclosing accountContainer.
The return value is an object implementing htmlElement.
The field name are used as keywords to load and save profiles. We recommend to use the module name as prefix for them (e.g. posixAccount_homeDirectory) to avoid naming conflicts.

#### Tags:

return: | meta HTML object
see: | baseModule::get_metaData()
see: | htmlElement
access: | public

Overridden in child classes as:

quota::get_profileOptions()
  Returns a list of elements for the account profiles.

sambaSamAccount::get_profileOptions()
  Returns a list of elements for the account profiles.

posixAccount::get_profileOptions()
  Returns a list of elements for the account profiles.

sambaGroupMapping::get_profileOptions()
  Returns a list of elements for the account profiles.

[ Top ]

### method get_RDNAttributes [line 473]

`array get_RDNAttributes( )`

Returns a hash array containing a list of possible LDAP attributes that can be used to form the RDN (Relative Distinguished Name).

Calling this method does not require the existence of an enclosing accountContainer.
The returned elements have this form: <attribute> => <priority>
<attribute> is the name of the LDAP attribute
<priority> defines the priority of the attribute (can be "low", "normal", "high")
Example: return array('uid' => 'normal', 'cn' => 'low')

#### Tags:

return: | list of attributes
see: | baseModule::get_metaData()
access: | public

[ Top ]

### method get_scope [line 385]

`string get_scope( )`

Returns the account type of this module (user, group, host)

#### Tags:

return: | account type
access: | public

[ Top ]

### method get_uploadColumns [line 852]

`array get_uploadColumns( array $selectedModules)`

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

Calling this method does not require the existence of an enclosing accountContainer.
This funtion returns an array which contains subarrays which represent an upload column. Syntax of column arrays:
array(
string: name, // fixed non-translated name which is used as column name (should be of format: <module name>_<column name>)
string: description, // short descriptive name
string: help, // help ID
string: example, // example value
string: values, // possible input values (optional)
string: default, // default value (optional)
boolean: required // true, if user must set a value for this column
boolean: unique // true if all values of this column must be different values (optional, default: "false")
)

#### Tags:

return: | column list
see: | baseModule::get_metaData()
access: | public

Overridden in child classes as:

account::get_uploadColumns()
  Returns an array containing all input columns for the file upload.

quota::get_uploadColumns()
  Returns an array containing all input columns for the file upload.

inetOrgPerson::get_uploadColumns()
  Returns an array containing all input columns for the file upload.

#### Parameters:

array | $selectedModules | list of selected account modules

[ Top ]

### method get_uploadPreDepends [line 868]

`array get_uploadPreDepends( )`

Returns a list of module names which must be processed in building the account befor this module.

Calling this method does not require the existence of an enclosing accountContainer.
The named modules may not be active, LAM will check this automatically.

#### Tags:

return: | list of module names
see: | baseModule::get_metaData()
access: | public

[ Top ]

### method init [line 113]

`void init( string $base)`

Initializes the module after it became part of an accountContainer

Calling this method requires the existence of an enclosing accountContainer.

#### Tags:

access: | public

Overridden in child classes as:

posixGroup::init()
  This functin will be called when the module will be loaded *

sambaSamAccount::init()
  Initializes the module after it became part of an accountContainer

posixAccount::init()
  Initializes the module after it became part of an accountContainer

ddns::init()
  Initializes the module after it became part of an accountContainer

#### Parameters:

string | $base | the name of the accountContainer object ($_SESSION[$base])

[ Top ]

### method isBooleanConfigOptionSet [line 1377]

`boolean isBooleanConfigOptionSet( String $optionName)`

Returns if the given configuration option is set.

This function returns false if the configuration options cannot be read.

#### Tags:

return: | true if option is set
access: | protected

#### Parameters:

String | $optionName | name of the option

[ Top ]

### method is_base_module [line 415]

`boolean is_base_module( )`

Returns true if your module is a base module and otherwise false.

Calling this method does not require the existence of an enclosing accountContainer.
Every account type needs exactly one base module. A base module manages a structural object class. E.g. the inetOrgPerson module is a base module since its object class is structural.

#### Tags:

return: | true if base module (defaults to false if no meta data is provided)
see: | baseModule::get_metaData()
access: | public

[ Top ]

### method load_attributes [line 141]

`void load_attributes( array $attributes)`

This function loads the LDAP attributes when an account should be loaded.

Calling this method requires the existence of an enclosing accountContainer.
By default this method loads the object classes and accounts which are specified in getManagedObjectClasses() and getManagedAttributes().

#### Tags:

access: | public

Overridden in child classes as:

sambaSamAccount::load_attributes()
  This function loads the LDAP attributes for this module.

posixAccount::load_attributes()
  This function loads all needed LDAP attributes.

range::load_attributes()
  This function loads all needed LDAP attributes.

ddns::load_attributes()
  This function loads the LDAP attributes when an account should be loaded.

fixed_ip::load_attributes()
  This function loads all needed LDAP attributes.

#### Parameters:

array | $attributes | array like the array returned by get_ldap_attributes(dn of account) but without count indices

[ Top ]

### method load_Messages [line 103]

`void load_Messages( )`

This function fills the $messages variable with output messages from this module.

Calling this method requires the existence of an enclosing accountContainer.

#### Tags:

access: | protected

Overridden in child classes as:

asteriskAccount::load_Messages()
  This function fills the error message array with messages

account::load_Messages()
  This function fills the message array.

ieee802Device::load_Messages()
  This function fills the error message array with messages

posixGroup::load_Messages()
  This function fills the $messages variable with output messages from this module.

dhcp_settings::load_Messages()
  This function fills the message array.

eduPerson::load_Messages()
  This function fills the error message array with messages

quota::load_Messages()
  this functin fills the error message array with messages

sambaSamAccount::load_Messages()
  this functin fills the error message array with messages

posixAccount::load_Messages()
  This function fills the error message array with messages.

kolabUser::load_Messages()
  This function fills the error message array with messages

phpGroupwareUser::load_Messages()
  This function builds up the message array.

range::load_Messages()
  This function fills the error message array with messages.

ddns::load_Messages()
  This function fills the message array.

sambaGroupMapping::load_Messages()
  this functin fills the error message array with messages

shadowAccount::load_Messages()
  This function builds up the message array.

nisnetgroup::load_Messages()
  This function fills the $messages variable with output messages from this module.

sambaDomain::load_Messages()
  This function fills the error message array with messages

inetOrgPerson::load_Messages()
  This function fills the message array.

asteriskExtension::load_Messages()
  This function fills the error message array with messages

asteriskVoicemail::load_Messages()
  This function fills the error message array with messages

inetLocalMailRecipient::load_Messages()
  This function fills the error message array with messages

fixed_ip::load_Messages()
  This function fills the error message array with messages.

nisMailAlias::load_Messages()
  This function fills the error message array with messages

hostObject::load_Messages()
  This function fills the error message array with messages

[ Top ]

### method load_profile [line 622]

`void load_profile( array $profile)`

This function loads the values from an account profile to the module's internal data structures.

Calling this method does not require the existence of an enclosing accountContainer.

#### Tags:

see: | baseModule::get_metaData()
access: | public

Overridden in child classes as:

dhcp_settings::load_profile()
  Loads the values of an account profile into internal variables.

eduPerson::load_profile()
  Loads the values of an account profile into internal variables.

quota::load_profile()
  Loads the values of an account profile into internal variables.

sambaSamAccount::load_profile()
  Loads the values of an account profile into internal variables.

posixAccount::load_profile()
  Loads the values of an account profile into internal variables.

phpGroupwareUser::load_profile()
  Loads the values of an account profile into internal variables.

sambaGroupMapping::load_profile()
  Loads the values of an account profile into internal variables.

shadowAccount::load_profile()
  Loads the values of an account profile into internal variables.

inetOrgPerson::load_profile()
  Loads the values of an account profile into internal variables.

hostObject::load_profile()
  Loads the values of an account profile into internal variables.

#### Parameters:

array | $profile | hash array with profile values (identifier => value)

[ Top ]

### method module_complete [line 956]

`boolean module_complete( )`

This function is used to check if all settings for this module have been made.

Calling this method requires the existence of an enclosing accountContainer.
This function tells LAM if it can create/modify the LDAP account. If your module needs any additional input then set this to false. The user will be notified that your module needs more input.
This method's return value defaults to true.

#### Tags:

return: | true, if settings are complete
access: | public

Overridden in child classes as:

account::module_complete()
  This functions returns true if all needed settings are done.

posixGroup::module_complete()
  This functions is used to check if all settings for this module have been made.

sambaSamAccount::module_complete()
  This function is used to check if all settings for this module have been made.

posixAccount::module_complete()
  This functions is used to check if all settings for this module have been made.

kolabUser::module_complete()
  This function returns true if all needed settings are done.

ddns::module_complete()
  This functions returns true if all needed settings are done.

sambaGroupMapping::module_complete()
  This function is used to check if all settings for this module have been made.

nisnetgroup::module_complete()
  This functions is used to check if all settings for this module have been made.

inetOrgPerson::module_complete()
  This functions return true if all needed settings are done.

asteriskVoicemail::module_complete()
  This functions returns true if all needed settings are done.

[ Top ]

### method module_ready [line 940]

`boolean module_ready( )`

This function is used to check if this module page can be displayed.

Calling this method requires the existence of an enclosing accountContainer.
Your module might depend on input of other modules. This function determines if the user can change to your module page or not. The return value is true if your module accepts input, otherwise false.
This method's return value defaults to true.

#### Tags:

return: | true, if page can be displayed
access: | public

Overridden in child classes as:

quota::module_ready()
  This function is used to check if this module page can be displayed.

sambaSamAccount::module_ready()
  This function is used to check if this module page can be displayed.

sambaGroupMapping::module_ready()
  This function is used to check if this module page can be displayed.

[ Top ]

### method postDeleteActions [line 1075]

`void postDeleteActions( )`

Allows the module to run commands after the LDAP entry is deleted.

Calling this method requires the existence of an enclosing accountContainer.

#### Tags:

access: | public

[ Top ]

### method postModifyActions [line 1053]

`void postModifyActions( boolean $newAccount, array $attributes)`

Allows the module to run commands after the LDAP entry is changed or created.

Calling this method requires the existence of an enclosing accountContainer.

#### Tags:

access: | public

Overridden in child classes as:

quota::postModifyActions()

posixAccount::postModifyActions()

fixed_ip::postModifyActions()
  This function is overwritten because the fixed IPs are set after the ldap_add command.

#### Parameters:

boolean | $newAccount | new account
array | $attributes | LDAP attributes of this entry

[ Top ]

### method postModifySelfService [line 1312]

`boolean postModifySelfService( array $attributes)`

Allows the module to run commands after the LDAP entry is changed or created.

#### Tags:

return: | true, if no problems occured
access: | public

#### Parameters:

array | $attributes | LDAP attributes of this entry

[ Top ]

### method preDeleteActions [line 1066]

`boolean preDeleteActions( )`

Allows the module to run commands before the LDAP entry is deleted.

Calling this method requires the existence of an enclosing accountContainer.
An error message should be printed if the function returns false.

#### Tags:

return: | true, if no problems occured
access: | public

Overridden in child classes as:

quota::preDeleteActions()
  Allows the module to run commands before the LDAP entry is deleted.

posixAccount::preDeleteActions()
  Allows the module to run commands before the LDAP entry is deleted.

[ Top ]

### method preModifyActions [line 1041]

`boolean preModifyActions( boolean $newAccount, array $attributes)`

Allows the module to run commands before the LDAP entry is changed or created.

Calling this method requires the existence of an enclosing accountContainer.
An error message should be printed if the function returns false.

#### Tags:

return: | true, if no problems occured
access: | public

#### Parameters:

boolean | $newAccount | new account
array | $attributes | LDAP attributes of this entry

[ Top ]

### method preModifySelfService [line 1302]

`boolean preModifySelfService( array $attributes)`

Allows the module to run commands before the LDAP entry is changed or created.

An error message should be printed if the function returns false.

#### Tags:

return: | true, if no problems occured
access: | public

#### Parameters:

array | $attributes | LDAP attributes of this entry

[ Top ]

### method process_attributes [line 1118]

`array process_attributes( )`

This function processes user input.

Calling this method requires the existence of an enclosing accountContainer.
It checks the user input and saves changes in the module's data structures.
Example: return array(array('ERROR', 'Invalid input!', 'This is not allowed here.'));

#### Tags:

return: | Array which contains status messages. Each entry is an array containing the status message parameters.
abstract: |
access: | public

Overridden in child classes as:

phpGroupwareGroup::process_attributes()
  Processes user input of the primary module page.

asteriskAccount::process_attributes()
  Write variables into object and do some regex checks

account::process_attributes()
  Processes user input of the primary module page.

ieee802Device::process_attributes()
  Processes user input of the primary module page.

posixGroup::process_attributes()
  Processes user input of the primary module page.

dhcp_settings::process_attributes()
  Processes user input of the primary module page.

eduPerson::process_attributes()
  Processes user input of the primary module page.

quota::process_attributes()
  Processes user input of the primary module page.

sambaSamAccount::process_attributes()
  Processes user input of the primary module page.

posixAccount::process_attributes()
  Processes user input of the primary module page.

kolabUser::process_attributes()
  Processes user input of the primary module page.

phpGroupwareUser::process_attributes()
  Processes user input of the primary module page.

range::process_attributes()
  Processes user input of the primary module page.

ddns::process_attributes()
  Processes user input of the primary module page.

sambaGroupMapping::process_attributes()
  Processes user input of the primary module page.

shadowAccount::process_attributes()
  Processes user input of the primary module page.

ldapPublicKey::process_attributes()
  Processes user input of the primary module page.

nisnetgroup::process_attributes()
  Processes user input of the primary module page.

sambaDomain::process_attributes()
  Processes user input of the primary module page.

inetOrgPerson::process_attributes()
  Processes user input of the primary module page.

asteriskExtension::process_attributes()
  Write variables into object and do some regex checks

asteriskVoicemail::process_attributes()
  Write variables into object and do some regex checks

inetLocalMailRecipient::process_attributes()
  Processes user input of the primary module page.

fixed_ip::process_attributes()
  Processes user input of the primary module page.

nisMailAlias::process_attributes()
  Processes user input of the primary module page.

hostObject::process_attributes()
  Processes user input of the primary module page.

[ Top ]

### method save_attributes [line 1026]

`array save_attributes( )`

Returns a list of modifications which have to be made to the LDAP account.

Calling this method requires the existence of an enclosing accountContainer.

This function returns an array with 3 entries:
array( DN1 ('add' => array($attr), 'remove' => array($attr), 'modify' => array($attr)), DN2 .... )
DN is the DN to change. It is possible to change several DNs (e.g. create a new user and add him to some groups via attribute memberUid)
"add" are attributes which have to be added to the LDAP entry
"remove" are attributes which have to be removed from the LDAP entry
"modify" are attributes which have to be modified in the LDAP entry
"notchanged" are attributes which stay unchanged
This builds the required comands from $this-attributes and $this->orig.

#### Tags:

return: | list of modifications
access: | public

Overridden in child classes as:

phpGroupwareGroup::save_attributes()
  Returns a list of modifications which have to be made to the LDAP account.

asteriskAccount::save_attributes()
  Returns a list of modifications which have to be made to the LDAP account.

account::save_attributes()
  Returns a list of modifications which have to be made to the LDAP account.

posixGroup::save_attributes()
  Returns a list of modifications which have to be made to the LDAP account.

dhcp_settings::save_attributes()
  This function returns an array with 4 entries:

sambaSamAccount::save_attributes()
  Returns a list of modifications which have to be made to the LDAP account.

posixAccount::save_attributes()
  Returns a list of modifications which have to be made to the LDAP account.

kolabUser::save_attributes()
  Returns a list of modifications which have to be made to the LDAP account.

phpGroupwareUser::save_attributes()
  Returns a list of modifications which have to be made to the LDAP account.

range::save_attributes()
  This function returns an array with 4 entries:

sambaGroupMapping::save_attributes()
  Returns a list of modifications which have to be made to the LDAP account.

shadowAccount::save_attributes()
  Returns a list of modifications which have to be made to the LDAP account.

nisnetgroup::save_attributes()
  Returns a list of modifications which have to be made to the LDAP account.

inetOrgPerson::save_attributes()
  Returns a list of modifications which have to be made to the LDAP account.

asteriskVoicemail::save_attributes()
  Returns a list of modifications which have to be made to the LDAP account.

fixed_ip::save_attributes()
  This function returns an array with 4 entries:

nisMailAlias::save_attributes()
  Returns a list of modifications which have to be made to the LDAP account.

hostObject::save_attributes()
  Returns a list of modifications which have to be made to the LDAP account.

[ Top ]

Documentation generated on Thu, 28 Oct 2010 21:00:07 +0200 by phpDocumentor 1.4.1