constructor __construct [line 87]
method build_uploadAccounts [line 854]
method can_manage [line 397]
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:
method checkSelfServiceOptions [line 1216]
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:
Overridden in child classes as:
- inetOrgPerson::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.
- sambaSamAccount::checkSelfServiceOptions()
- Checks if all input values are correct and returns the LDAP commands which should be executed.
Parameters:
method checkSelfServiceSettings [line 1252]
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:
Parameters:
method check_configOptions [line 670]
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:
Overridden in child classes as:
- posixAccount::check_configOptions()
- Checks input values of module settings.
Parameters:
method check_profileOptions [line 536]
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:
Overridden in child classes as:
- quota::check_profileOptions()
- Checks input values of account profiles.
Parameters:
method delete_attributes [line 1054]
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:
Overridden in child classes as:
- posixAccount::delete_attributes()
- Additional LDAP operations on delete.
- posixGroup::delete_attributes()
- Checks if the group which should be deleted is still used as primary group.
method display_html_attributes [line 1095]
method display_html_delete [line 1069]
meta 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:
Overridden in child classes as:
- posixAccount::display_html_delete()
- Displays the delete homedir option for the delete page.
method doUploadPostActions [line 967]
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:
Overridden in child classes as:
- posixAccount::doUploadPostActions()
- This function executes one post upload action.
- quota::doUploadPostActions()
- This function executes one post upload action.
Parameters:
method getAccountContainer [line 1264]
method getAttributes [line 1278]
Returns the LDAP attributes which are managed in this module.
Tags:
method getButtonStatus [line 942]
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:
Overridden in child classes as:
- account::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.
- nisMailAlias::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.
method getIcon [line 1300]
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:
method getLDAPAliases [line 1126]
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:
method getManagedAttributes [line 1139]
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:
method getManagedObjectClasses [line 1110]
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:
method getOriginalAttributes [line 1287]
array getOriginalAttributes(
)
|
|
Returns the LDAP attributes which are managed in this module (with unchanged values).
Tags:
method getRequiredExtensions [line 1153]
array getRequiredExtensions(
)
|
|
This function returns a list of PHP extensions (e.g. mhash) which are needed by this module.
Calling this method does not require the existence of an enclosing accountContainer.
Tags:
method getSelfServiceFields [line 1183]
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:
method getSelfServiceOptions [line 1202]
array 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.
Format: array(<field1> => array(<META HTML>), ...)
It is not possible to display help links.
Tags:
Overridden in child classes as:
- inetOrgPerson::getSelfServiceOptions()
- Returns the meta HTML code for each input field.
- posixAccount::getSelfServiceOptions()
- Returns the meta HTML code for each input field.
Parameters:
method getSelfServiceSearchAttributes [line 1167]
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:
method getSelfServiceSettings [line 1235]
array getSelfServiceSettings(
)
|
|
Returns a list of self service configuration settings.
Calling this method does not require the existence of an enclosing accountContainer.
The type "fieldset" is not allowed here. 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:
method get_alias [line 452]
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:
method get_configOptions [line 647]
array 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 type "fieldset" is not allowed here. 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:
Overridden in child classes as:
- posixGroup::get_configOptions()
- Returns a list of elements for the configuration.
Parameters:
method get_dependencies [line 495]
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:
method get_help [line 884]
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://lam.sf.net'))
Tags:
Parameters:
method get_ldap_filter [line 434]
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:
method get_metaData [line 375]
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('mhash')
- 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:
Overridden in child classes as:
- account::get_metaData()
- Returns meta data that is interpreted by parent class
- ieee802Device::get_metaData()
- Returns meta data that is interpreted by parent class
- inetLocalMailRecipient::get_metaData()
- Returns meta data that is interpreted by parent class
- inetOrgPerson::get_metaData()
- Returns meta data that is interpreted by parent class
- kolabUser::get_metaData()
- Returns meta data that is interpreted by parent class
- ldapPublicKey::get_metaData()
- Returns meta data that is interpreted by parent class
- nisMailAlias::get_metaData()
- Returns meta data that is interpreted by parent class
- posixAccount::get_metaData()
- Returns meta data that is interpreted by parent class
- posixGroup::get_metaData()
- Returns meta data that is interpreted by parent class
- quota::get_metaData()
- Returns meta data that is interpreted by parent class
- sambaAccount::get_metaData()
- Returns meta data that is interpreted by parent class
- sambaDomain::get_metaData()
- Returns meta data that is interpreted by parent class
- sambaGroupMapping::get_metaData()
- Returns meta data that is interpreted by parent class
- sambaSamAccount::get_metaData()
- Returns meta data that is interpreted by parent class
- shadowAccount::get_metaData()
- Returns meta data that is interpreted by parent class
method get_pdfFields [line 794]
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:
Parameters:
method get_profileOptions [line 515]
array 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 array that contains meta HTML code.
The type "fieldset" is not allowed here. The name attributes 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:
Overridden in child classes as:
- posixAccount::get_profileOptions()
- Returns a list of elements for the account profiles.
- quota::get_profileOptions()
- Returns a list of elements for the account profiles.
- sambaGroupMapping::get_profileOptions()
- Returns a list of elements for the account profiles.
- sambaSamAccount::get_profileOptions()
- Returns a list of elements for the account profiles.
method get_RDNAttributes [line 472]
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:
method get_scope [line 384]
Returns the account type of this module (user, group, host)
Tags:
method get_uploadColumns [line 821]
array get_uploadColumns(
)
|
|
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:
Overridden in child classes as:
- quota::get_uploadColumns()
- Returns an array containing all input columns for the file upload.
method get_uploadPreDepends [line 837]
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:
method init [line 112]
method is_base_module [line 414]
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:
method load_attributes [line 140]
method load_Messages [line 102]
method load_profile [line 621]
method module_complete [line 924]
boolean module_complete(
)
|
|
This functions 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:
Overridden in child classes as:
- account::module_complete()
- This functions returns true if all needed settings are done.
- inetOrgPerson::module_complete()
- This functions return true if all needed settings are done.
- kolabUser::module_complete()
- This function returns true if all needed settings are done.
- posixAccount::module_complete()
- This functions is used to check if all settings for this module have been made.
- posixGroup::module_complete()
- This functions is used to check if all settings for this module have been made.
- sambaAccount::module_complete()
- This functions returns true if all needed settings are done
method module_ready [line 908]
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:
Overridden in child classes as:
- quota::module_ready()
- This function is used to check if this module page can be displayed.
- sambaAccount::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.
- sambaSamAccount::module_ready()
- This function is used to check if this module page can be displayed.
method postDeleteActions [line 1041]
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:
method postModifyActions [line 1019]
void postModifyActions(
boolean
$newAccount)
|
|
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:
Overridden in child classes as:
- posixAccount::postModifyActions()
- Allows the module to run commands after the LDAP entry was changed or created.
- quota::postModifyActions()
- Allows the module to run commands after the LDAP entry is changed or created.
Parameters:
method preDeleteActions [line 1032]
true, 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:
Overridden in child classes as:
- posixAccount::preDeleteActions()
- Allows the module to run commands before the LDAP entry is deleted.
- quota::preDeleteActions()
- Allows the module to run commands before the LDAP entry is deleted.
method preModifyActions [line 1008]
true, preModifyActions(
boolean
$newAccount)
|
|
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:
Parameters:
method process_attributes [line 1084]
method save_attributes [line 994]
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:
Overridden in child classes as:
- account::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.
- kolabUser::save_attributes()
- Returns a list of modifications which have to be made to the LDAP account.
- nisMailAlias::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.
- posixGroup::save_attributes()
- Returns a list of modifications which have to be made to the LDAP account.
- sambaAccount::save_attributes()
- Returns a list of modifications which have to be made to the LDAP account.
- sambaGroupMapping::save_attributes()
- Returns a list of modifications which have to be made to the LDAP account.
- sambaSamAccount::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.