LDAP Account Manager

main

Interfaces, Classes, Traits and Enums

ServerProfilePersistenceStrategy
Interface to store server profiles.
ImageManipulator
Modifies images.
ImporterTask
A single import task.
AccountStatusProvider
Provides module information about the status of an LDAP account.
SelfServicePersistenceStrategy
Interface for self service profile persistence.
SelfServiceLoginHandler
Login handler for self service
BaseProvider
Base class for 2-factor authentication providers.
PrivacyIDEAProvider
Provider for privacyIDEA.
YubicoProvider
Authentication via YubiKeys.
DuoProvider
Provider for DUO.
OktaProvider
Provider for Okta.
OpenIdProvider
Provider for OpenId.
WebauthnProvider
Provider for Webauthn.
TwoFactorProviderService
Returns the correct 2 factor provider.
TwoFactorConfiguration
Configuration settings for 2-factor authentication.
ServerProfilePersistenceManager
Manages the persistence of server profiles.
ServerProfilePersistenceStrategyFiles
Uses local file system to store server profiles.
ServerProfilePersistenceStrategyPdo
Stores server profiles in a database.
ConfigurationPageTab
List of tabs.
ImageManipulationFactory
Factory to create modificators for images.
ImageManipulatorImagick
Manipulates images using Imagick library.
ImageManipulatorGd
Manipulates images using gd library.
AddEntryTask
Adds a complete LDAP entry.
RenameEntryTask
Renames an LDAP entry.
DeleteEntryTask
Deletes an LDAP entry.
MultiTask
Combines multiple import tasks.
AddAttributesTask
Adds attributes to an existing LDAP entry.
DeleteAttributesTask
Deletes attributes from an existing LDAP entry.
ReplaceAttributesTask
Replaces attributes in an existing LDAP entry.
LAMTCPDF
PasswordQuickChangeOption
Option for the password quick change page.
AccountStatus
Provides the complete information about the status of an LDAP account.
AccountStatusDetails
ScopeAndModuleValidation
Validation of scope and module names.
PDFStructureReader
Reads a PDF structure.
PDFStructureWriter
Writes PDF structures to files.
PDFStructure
PDF structure
PDFTextSection
Section for static text.
PDFEntrySection
PDF section that contains LDAP data entries.
PDFSectionEntry
Single PDF entry.
ConfigDataExporter
Exporter for LAM's configuration data.
ConfigDataImporter
Importer for LAM's configuration data.
ImporterStep
Step of the import process.
UserPasswordExtraInvalidCredentialsProvider
Extra message for invalid credentials for PPolicy.
Remote
Runs remote commands.
RemoteServerConfiguration
Server configuration.
SelfServicePersistence
Manages reading and writing self service profiles.
SelfServicePersistenceStrategyFileSystem
Uses local file system for storing self service profiles.
SelfServicePersistenceStrategyPdo
Uses PDO for storing self service profiles.
SelfServiceLdapConnection
LDAP connection for self service.
SelfServiceUserPasswordLoginHandler
Performs login with user and password.
SelfServiceHttpAuthLoginHandler
Performs login with HTTP authentication.
SelfService2FaLoginHandler
Performs login with pure 2FA.
Ajax
Manages all AJAX requests.
JobRun
Represents a job run.

Table of Contents

ADD  = 'add'
DEL  = 'del'
GLOBAL_PROFILE  = '__GLOBAL__'
Use as server profile name to manage global templates.
JOB_RUNS  = 'lam_job_runs'
table name for schema versions
LAMPDF_FONT_SIZE  = 7
font size
LAMPDF_FONT_SIZE_BIG  = 10
font size for bigger text
LAMPDF_LABELWIDTH  = 50
width of a label
LAMPDF_LINEHEIGHT  = 5
line height
LAMPDF_LINEWIDTH  = 190
line width
MOD  = 'mod'
STAGE_ACTIONS_CALCULATED  = 'actionsCalculated'
STAGE_FINISHED  = 'finished'
STAGE_READ_FINISHED  = 'readFinished'
STAGE_START  = 'start'
STAGE_WRITING  = 'writing'
printHeader()  : void
setSSLCaCert()  : mixed
Sets the environment variables for custom SSL CA certificates.
setlanguage()  : mixed
Sets language settings for automatic translation
checkChmod()  : mixed
Checks whether a specific flag in the rights string is set.
LAMVersion()  : string
Returns the version number of this LAM installation.
extractConfigOptionsFromPOST()  : array<string|int, mixed>
Extracts config options from HTTP POST data.
metaRefresh()  : mixed
Prints a meta refresh page
isAccountTypeHidden()  : bool
Checks if the given account type is hidden.
getLanguages()  : array<string|int, LAMLanguage>
Returns a list of all supported languages.
printConfigurationPageHeaderBar()  : mixed
Prints the header bar.
printConfigurationPageTabs()  : mixed
Prints the tab list.
getModuleAlias()  : string|null
Returns the alias name of a module
is_base_module()  : bool
Returns true if the module is a base module
get_ldap_filter()  : string
Returns the LDAP filter used by the account lists
getRDNAttributes()  : array<string|int, mixed>
Returns a list of LDAP attributes which can be used to form the RDN.
getModulesDependencies()  : array<string|int, mixed>
Returns a hash array (module name => dependencies) of all module dependencies
check_module_depends()  : mixed
Checks if there are missing dependencies between modules.
check_module_conflicts()  : bool
Checks if there are conflicts between modules
getAvailableModules()  : array<string|int, mixed>
Returns an array with all available user module names
getProfileOptions()  : array<string|int, mixed>
Returns the elements for the profile page.
checkProfileOptions()  : array<string|int, mixed>
Checks if the profile options are valid
getConfigOptions()  : array<string|int, mixed>
Returns a hash array (module name => elements) of all module options for the configuration page.
checkConfigOptions()  : array<string|int, mixed>
Checks if the configuration options are valid
getHelp()  : array<string|int, mixed>
Returns a help entry from an account module.
getAvailablePDFFields()  : array<string|int, mixed>
Returns a list of available PDF entries.
getUploadColumns()  : array<string|int, mixed>
Returns an array containing all input columns for the file upload.
buildUploadAccounts()  : mixed
This function builds the LDAP accounts for the file upload.
doUploadPreActions()  : array<string|int, mixed>
Runs any actions that need to be done before an LDAP entry is created.
doUploadPostActions()  : array<string|int, mixed>
This function executes one post upload action.
getRequiredExtensions()  : array<string|int, mixed>
Returns true if the module is a base module
parseHtml()  : array<string|int, mixed>
Takes a list of meta-HTML elements and prints the equivalent HTML output.
lamCompareDescriptiveOptions()  : int
Helper function to sort descriptive options in parseHTML().
printHelpLink()  : mixed
Prints a LAM help link.
createModulePDF()  : string
This function creates the PDF output of one or more accounts.
createPdf()  : string
This function creates the PDF output of one or more accounts using TCPDF.
getSectionHeadline()  : string
Creates a section headline.
printLabelValue()  : mixed
Prints a PDFLabelValue entry.
printTable()  : mixed
Prints a PDFTable entry.
printImage()  : mixed
Prints an image entry.
getPdfFonts()  : array<string|int, mixed>
Returns a list of possible fonts.
dbTableExists()  : bool
Returns if the given table name exists
_get_schema_dn()  : string
Helper for _get_raw_schema() which fetches the DN of the schema object in an LDAP server based on a DN. Entries should set the subSchemaSubEntry attribute pointing to the DN of the server schema. You can specify the DN whose subSchemaSubEntry you wish to retrieve of specify an empty string to fetch the subScehamSubEntry from the Root DSE.
_get_raw_schema()  : an
Fetches the raw schema array for the subschemaSubentry of the server. Note, this function has grown many hairs to accommodate more LDAP servers. It is needfully complicated as it now supports many popular LDAP servers that don't necessarily expose their schema "the right way".
get_schema_objectclasses()  : array<string|int, ObjectClass>
Gets an associative array of ObjectClass objects for the specified server. Each array entry's key is the name of the objectClass in lower-case and the value is an ObjectClass object.
get_schema_objectclass()  : ObjectClass
Gets a single ObjectClass object specified by name.
get_schema_attribute()  : AttributeType
Gets a single AttributeType object specified by name.
get_schema_attributes()  : array<string|int, mixed>
Gets an associative array of AttributeType objects for the specified server. Each array entry's key is the name of the attributeType in lower-case and the value is an AttributeType object.
add_aliases_to_attrs()  : mixed
For each attribute that has multiple names, this function adds unique entries to the attrs array for those names. Ie, attributeType has name 'gn' and 'givenName'.
add_sup_to_attrs()  : mixed
Adds inherited values to each attributeType specified by the SUP directive.
get_schema_matching_rules()  : mixed
Returns an array of MatchingRule objects for the specified server.
get_schema_syntaxes()  : mixed
Returns an array of Syntax objects that this LDAP server uses mapped to their descriptions. The key of each entry is the OID of the Syntax.
cached_schema_available()  : mixed
Returns true if the schema for $schema_type has been cached and is available. $schema_type may be one of (lowercase) the following: objectclasses attributetypes ldapsyntaxes matchingrules matchingruleuse Note that _get_raw_schema() takes a similar parameter.
get_cached_schema()  : mixed
Returns the cached array of schemaitem objects for the specified $schema_type. For list of valid $schema_type values, see above schema_cache_available(). Note that internally, this function utilizes a two-layer cache, one in memory using a static variable for multiple calls within the same page load, and one in a session for multiple calls within the same user session (spanning multiple page loads).
set_cached_schema()  : mixed
Caches the specified $schema_type.
set_schema_cache_unavailable()  : mixed
Sets the schema entry for the server_id to be "unavailable" so that we realize that we tried to get the schema but could not, so quit trying next time to fetch it from the server.
isLAMProVersion()  : bool
Returns if this is a LAM Pro installation.
getSelfServiceSearchAttributes()  : array<string|int, mixed>
Returns a list of possible search attributes for the self service.
getSelfServiceFieldSettings()  : array<string|int, mixed>
Returns the field settings for the self service.
getSelfServiceOptions()  : array<string|int, mixed>
Returns meta HTML code for each self service field.
checkSelfServiceOptions()  : array<string|int, mixed>
Checks if all input values are correct and returns the LDAP commands which should be executed.
getSelfServiceSettings()  : array<string|int, mixed>
Returns a hash array (module name => elements) of all module options for the configuration page.
checkSelfServiceSettings()  : array<string|int, mixed>
Checks if the self service settings are valid
isSelfService()  : bool
Returns if script runs inside self service.
openSelfServiceLdapConnection()  : handle
Opens the LDAP connection and returns the handle. No bind is done.
bindLdapUser()  : bool
Binds the LDAP connections with given user and password.
compareNodeByIdAsDn()  : int
Compares two nodes by interpreting their ID as DN.
compareByAttributes()  : int
Compares two arrays with LDAP attributes by global $lamOrderByAttribute.
getTypes()  : array<string|int, mixed>
Returns a list of available account types.
getTypeDescription()  : string
Returns the description of an account type.
getScopeFromTypeId()  : string
Returns the account type for a given type id.
cleanDn()  : string
Cleans the given DN from GET.
printContent()  : void
Displays the content area
showLoginDialog()  : void
Shows the login dialog for the configuration master password.
renderBackLink()  : void
Renders the link back to login page.
checkLogin()  : bool
Checks the login password.
displayImportExport()  : void
Displays the import/export functions.
renderImportPart()  : void
Renders the import area.
checkInput()  : array<string|int, mixed>
Checks user input and saves the entered settings.
config_showAccountModules()  : void
Displays the module selection boxes and checks if dependencies are fulfilled.
checkInput()  : array<string|int, mixed>
Checks user input and saves the entered settings.
checkInput()  : array<string|int, mixed>
Checks user input and saves the entered settings.
compareTypesByAlias()  : int
Compares types by alias for sorting.
formatSSLTimestamp()  : string
Formats an LDAP time string (e.g. from createTimestamp).
checkInput()  : array<string|int, mixed>
Checks user input and saves the entered settings.
getChildCount()  : int
Returns the number of child entries of a DN.
echoHTMLHead()  : void
Print HTML header of the help page.
echoHTMLFoot()  : void
Print HTML footer of the help page.
displayHelp()  : void
Print help site for a specific help number.
search_username()  : string
Searches LDAP for a specific user name (uid attribute) and returns its DN entry
display_LoginPage()  : void
Displays the login window.
displayLoginHeader()  : void
Displays the header on the login page.
printHeader()  : void
Prints the page header.
printFooter()  : void
Prints the page footer.
importStructures()  : htmlStatusMessage
Imports the selected PDF structures.
exportStructures()  : htmlStatusMessage
Exports the selected account profile.
translateFieldIDToName()  : string|null
Translates a given field ID (e.g. inetOrgPerson_givenName) to its descriptive name.
updateBasicSettings()  : void
Updates basic settings such as logo and head line.
updateSectionTitles()  : void
Updates section titles.
addSection()  : void
Adds a new section if requested.
addSectionEntry()  : void
Adds a new entry to a section if requested.
removeItem()  : void
Removes a section or entry if requested.
moveUp()  : void
Moves up a section or entry if requested.
moveDown()  : void
Moves down a section or entry if requested.
importProfiles()  : htmlStatusMessage
Imports the selected account profiles.
exportProfiles()  : htmlStatusMessage
Exports the selected account profile.
displaySyntaxList()  : void
Displays the syntax list.
displayRuleList()  : void
Displays the matching rule list.
displayObjectClassList()  : void
Displays the object class list.
displayAttributeList()  : void
Displays the attributes list.
testRemoteCommand()  : bool
Runs a test case of lamdaemon.
lamRunTestSuite()  : void
Runs all tests for a given server.
checkSchemaForModule()  : string
Checks if the object classes and attributes for this module are available.
getRecursiveAttributesFromObjectClass()  : array<string|int, mixed>
Returns the names of all attributes which are managed by the given object class and its parents.
printImportTabContent()  : void
Prints the content area for the import tab.
printImportTabProcessing()  : void
Prints the content area for the import tab during processing state.
checkImportData()  : void
Checks if the import data is ok.
printExportTabContent()  : void
Prints the content area for the export tab.
getDefaultBaseDn()  : string
Returns the default base DN.
isValidExportDn()  : bool
Checks if the given DN is valid for exporting.
printExportTabProcessing()  : void
Prints the content area for the export tab during processing state.
checkExportData()  : void
Checks if the export data is ok.
displayStartPage()  : void
Displays the main page of the multi edit tool.
runActions()  : void
Runs the dry run and change actions.
runAjaxActions()  : void
Performs the modify operations.
readLDAPData()  : array<string|int, mixed>
Reads the LDAP entries from the directory.
generateActions()  : array<string|int, mixed>
Generates the required actions based on the read LDAP data.
dryRun()  : array<string|int, mixed>
Prints the dryRun output.
multiEditLdapErrorHandler()  : void
Error handler
doModify()  : array<string|int, mixed>
Runs the actual modifications.
getMessageHTML()  : string
Returns the HTML code for a htmlStatusMessage
display_main()  : void
Displays the main page of the OU editor
showTree()  : void
addNewDevice()  : void
Checks if a new device should be registered and adds it.
showRemoveMessage()  : void
Shows the message if a device was removed.
massPrintBackButton()  : void
Prints a back button to the page where the user enters a file to upload.
showMainPage()  : void
Displays the account type specific main page of the upload.
extractWildcards()  : array<string|int, mixed>
Extracts any wildcards from the value field.
replaceWildcards()  : string
Replaces wildcards in the user entered value.
setMimeType()  : void
Sets the mime type.

Constants

GLOBAL_PROFILE

Use as server profile name to manage global templates.

public mixed GLOBAL_PROFILE = '__GLOBAL__'

JOB_RUNS

table name for schema versions

public mixed JOB_RUNS = 'lam_job_runs'

LAMPDF_FONT_SIZE

font size

public mixed LAMPDF_FONT_SIZE = 7

LAMPDF_FONT_SIZE_BIG

font size for bigger text

public mixed LAMPDF_FONT_SIZE_BIG = 10

LAMPDF_LABELWIDTH

width of a label

public mixed LAMPDF_LABELWIDTH = 50

LAMPDF_LINEHEIGHT

line height

public mixed LAMPDF_LINEHEIGHT = 5

LAMPDF_LINEWIDTH

line width

public mixed LAMPDF_LINEWIDTH = 190

STAGE_ACTIONS_CALCULATED

public mixed STAGE_ACTIONS_CALCULATED = 'actionsCalculated'

STAGE_FINISHED

public mixed STAGE_FINISHED = 'finished'

STAGE_READ_FINISHED

public mixed STAGE_READ_FINISHED = 'readFinished'

STAGE_START

public mixed STAGE_START = 'start'

STAGE_WRITING

public mixed STAGE_WRITING = 'writing'

Functions

printHeader()

printHeader(string $headerPrefix) : void
Parameters
$headerPrefix : string
Return values
void

setSSLCaCert()

Sets the environment variables for custom SSL CA certificates.

setSSLCaCert() : mixed
Return values
mixed

setlanguage()

Sets language settings for automatic translation

setlanguage() : mixed
Return values
mixed

checkChmod()

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

checkChmod(string $right, string $target, string $chmod) : mixed
Parameters
$right : string

read, write or execute

$target : string

owner, group or other

$chmod : string

the chmod rights

Return values
mixed

LAMVersion()

Returns the version number of this LAM installation.

LAMVersion() : string

Format: ..
Major/minor version are always numbers, patch level may contain letters for unofficial releases only (e.g. 0.5.alpha1).

Return values
string

version number

extractConfigOptionsFromPOST()

Extracts config options from HTTP POST data.

extractConfigOptionsFromPOST(array<string|int, mixed> $confTypes) : array<string|int, mixed>
Parameters
$confTypes : array<string|int, mixed>

array (option name => type (e.g. multiselect))

Return values
array<string|int, mixed>

list of config options (name =>[values])

metaRefresh()

Prints a meta refresh page

metaRefresh(string $page) : mixed
Parameters
$page : string

the URL of the target page

Return values
mixed

isAccountTypeHidden()

Checks if the given account type is hidden.

isAccountTypeHidden(string $type) : bool
Parameters
$type : string

account type (e.g. user)

Return values
bool

is hidden

getLanguages()

Returns a list of all supported languages.

getLanguages() : array<string|int, LAMLanguage>
Return values
array<string|int, LAMLanguage>

languages

printConfigurationPageHeaderBar()

Prints the header bar.

printConfigurationPageHeaderBar(LAMConfig $conf) : mixed
Parameters
$conf : LAMConfig

configuration object

Return values
mixed

getModuleAlias()

Returns the alias name of a module

getModuleAlias(string $name, string $scope) : string|null
Parameters
$name : string

the module name

$scope : string

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

Return values
string|null

alias name

is_base_module()

Returns true if the module is a base module

is_base_module(string $name, string $scope) : bool
Parameters
$name : string

the module name

$scope : string

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

Return values
bool

true if base module

get_ldap_filter()

Returns the LDAP filter used by the account lists

get_ldap_filter(string $typeId) : string
Parameters
$typeId : string

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

Return values
string

LDAP filter

getRDNAttributes()

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

getRDNAttributes(string $typeId[, array<string|int, mixed> $selectedModules = null ]) : array<string|int, mixed>

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

Parameters
$typeId : string

account type (user, group, host)

$selectedModules : array<string|int, mixed> = null

return only RDN attributes of these modules

Return values
array<string|int, mixed>

list of LDAP attributes

getModulesDependencies()

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

getModulesDependencies(string $scope) : array<string|int, mixed>

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

Parameters
$scope : string

the account type (user, group, host)

Return values
array<string|int, mixed>

dependencies

check_module_depends()

Checks if there are missing dependencies between modules.

check_module_depends(array<string|int, mixed> $selected, array<string|int, mixed> $deps) : mixed
Parameters
$selected : array<string|int, mixed>

selected module names

$deps : array<string|int, mixed>

module dependencies

Return values
mixed

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

check_module_conflicts()

Checks if there are conflicts between modules

check_module_conflicts(array<string|int, mixed> $selected, array<string|int, mixed> $deps) : bool
Parameters
$selected : array<string|int, mixed>

selected module names

$deps : array<string|int, mixed>

module dependencies

Return values
bool

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

getAvailableModules()

Returns an array with all available user module names

getAvailableModules(string $scope[, bool $mustSupportAdminInterface = false ]) : array<string|int, mixed>
Parameters
$scope : string

account type (user, group, host)

$mustSupportAdminInterface : bool = false

module must support LAM admin interface (default: false)

Return values
array<string|int, mixed>

list of possible modules

getProfileOptions()

Returns the elements for the profile page.

getProfileOptions(string $typeId) : array<string|int, mixed>
Parameters
$typeId : string

account type (user, group, host)

Return values
array<string|int, mixed>

profile elements

checkProfileOptions()

Checks if the profile options are valid

checkProfileOptions(string $typeId, array<string|int, mixed> $options) : array<string|int, mixed>
Parameters
$typeId : string

account type (user, group, host)

$options : array<string|int, mixed>

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

Return values
array<string|int, mixed>

list of error messages

getConfigOptions()

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

getConfigOptions(array<string|int, mixed> $moduleToScopes) : array<string|int, mixed>
Parameters
$moduleToScopes : array<string|int, mixed>

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

Return values
array<string|int, mixed>

configuration options

checkConfigOptions()

Checks if the configuration options are valid

checkConfigOptions(array<string|int, mixed> $moduleToTypeIds, array<string|int, mixed> &$options) : array<string|int, mixed>
Parameters
$moduleToTypeIds : array<string|int, mixed>

hash array (module name => array(account type ids))

$options : array<string|int, mixed>

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

Return values
array<string|int, mixed>

list of error messages

getHelp()

Returns a help entry from an account module.

getHelp(string $module, string $helpID, string $scope) : array<string|int, mixed>
Parameters
$module : string

module name

$helpID : string

help identifier

$scope : string

account type

Return values
array<string|int, mixed>

help entry

getAvailablePDFFields()

Returns a list of available PDF entries.

getAvailablePDFFields(string $typeId) : array<string|int, mixed>
Parameters
$typeId : string

account type (user, group, host)

Return values
array<string|int, mixed>

PDF entries (field ID => field label)

getUploadColumns()

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

getUploadColumns(ConfiguredType &$type, array<string|int, mixed> $selectedModules) : array<string|int, mixed>

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

Parameters
$type : ConfiguredType

account type

$selectedModules : array<string|int, mixed>

selected account modules

Return values
array<string|int, mixed>

column list

buildUploadAccounts()

This function builds the LDAP accounts for the file upload.

buildUploadAccounts(ConfiguredType $type, array<string|int, mixed> $data, array<string|int, mixed> $ids, array<string|int, mixed> $selectedModules, htmlResponsiveRow $container) : mixed

If there are problems status messages will be printed automatically.

Parameters
$type : ConfiguredType

account type

$data : array<string|int, mixed>

array containing one account in each element

$ids : array<string|int, mixed>

array(<column_name> => )

$selectedModules : array<string|int, mixed>

selected account modules

$container : htmlResponsiveRow

HTML container

Return values
mixed

array including accounts or false if there were errors

doUploadPreActions()

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

doUploadPreActions(ConfiguredType $type, array<string|int, mixed> $selectedModules, array<string|int, mixed> $attributes) : array<string|int, mixed>
Parameters
$type : ConfiguredType

account type

$selectedModules : array<string|int, mixed>

list of selected account modules

$attributes : array<string|int, mixed>

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

Return values
array<string|int, mixed>

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

doUploadPostActions()

This function executes one post upload action.

doUploadPostActions(ConfiguredType $type, array<string|int, mixed> &$data, array<string|int, mixed> $ids, array<string|int, mixed> $failed, array<string|int, mixed> $selectedModules, array<string|int, mixed> &$accounts) : array<string|int, mixed>
Parameters
$type : ConfiguredType

account type

$data : array<string|int, mixed>

array containing one account in each element

$ids : array<string|int, mixed>

array(<column_name> => )

$failed : array<string|int, mixed>

list of accounts which were not created successfully

$selectedModules : array<string|int, mixed>

list of selected account modules

$accounts : array<string|int, mixed>

list of LDAP entries

Return values
array<string|int, mixed>

current status
array (
'status' => 'finished' | 'inProgress'
'module' =>
'progress' => 0..100
'errors' => array (<array of parameters for StatusMessage>)
)

getRequiredExtensions()

Returns true if the module is a base module

getRequiredExtensions() : array<string|int, mixed>
Return values
array<string|int, mixed>

required extensions

parseHtml()

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

parseHtml(string $module, mixed $input, array<string|int, mixed> $values, bool $restricted, string $scope) : array<string|int, mixed>

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

Parameters
$module : string

Name of account module

$input : mixed

htmlElement or array of htmlElement elements

$values : array<string|int, mixed>

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

$restricted : bool

If true then no buttons will be displayed

$scope : string

Account type

Return values
array<string|int, mixed>

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

lamCompareDescriptiveOptions()

Helper function to sort descriptive options in parseHTML().

lamCompareDescriptiveOptions(array<string|int, mixed> &$a, array<string|int, mixed> &$b) : int

It compares the second entries of two arrays.

Parameters
$a : array<string|int, mixed>

first array

$b : array<string|int, mixed>

second array

Return values
int

compare result

Prints a LAM help link.

printHelpLink(array<string|int, mixed> $entry, string $number[, string $module = '' ][, string $scope = '' ][, array<string|int, mixed> $classes = [] ]) : mixed
Parameters
$entry : array<string|int, mixed>

help entry

$number : string

help number

$module : string = ''

module name

$scope : string = ''

account scope

$classes : array<string|int, mixed> = []

CSS classes

Return values
mixed

createModulePDF()

This function creates the PDF output of one or more accounts.

createModulePDF(array<string|int, mixed> $accounts, string $pdf_structure, string $font[,  $returnAsString = false ]) : string
Parameters
$accounts : array<string|int, mixed>

A numbered array containing all accounts the PDF page should be created for. The entries of the array must be AccountContainer objects.

$pdf_structure : string

The filename of the structure definition that should be used to create the PDF page. If not submitted the 'default.user' structure definition for the appropriate account type.

$font : string

font to use (e.g. DejaVu)

$returnAsString : = false

returns the PDF output as String value instead of writing it to a file

Tags
throws
LAMException

error creating PDF

Return values
string

PDF file name

createPdf()

This function creates the PDF output of one or more accounts using TCPDF.

createPdf(PDFstructure $structure, array<string|int, mixed> $accounts, mixed $pdfKeys, mixed $account_type, string $font, bool $returnAsString) : string
Parameters
$structure : PDFstructure

PDF structure

$accounts : array<string|int, mixed>

A numbered array containing all accounts the PDF page should be created for. The entries of the array must be AccountContainer objects.

$pdfKeys : mixed
$account_type : mixed
$font : string

font to use

$returnAsString : bool

returns the PDF output as String value instead of writing it to a file

Return values
string

PDF file name

getSectionHeadline()

Creates a section headline.

getSectionHeadline(PDFEntry $entry) : string
Parameters
$entry : PDFEntry

content entry

Return values
string

headline

printLabelValue()

Prints a PDFLabelValue entry.

printLabelValue(LAMTCPDF &$pdf, PDFLabelValue $valueEntry, string $fontName) : mixed
Parameters
$pdf : LAMTCPDF

PDF

$valueEntry : PDFLabelValue

entry

$fontName : string

font name

Return values
mixed

printTable()

Prints a PDFTable entry.

printTable(LAMTCPDF &$pdf, PDFTable $table, string $fontName) : mixed
Parameters
$pdf : LAMTCPDF

PDF

$table : PDFTable

entry

$fontName : string

font name

Return values
mixed

printImage()

Prints an image entry.

printImage(LAMTCPDF &$pdf, PDFImage $imageEntry, string $fontName) : mixed
Parameters
$pdf : LAMTCPDF

PDF

$imageEntry : PDFImage

entry

$fontName : string

font name

Return values
mixed

getPdfFonts()

Returns a list of possible fonts.

getPdfFonts() : array<string|int, mixed>
Return values
array<string|int, mixed>

list of fonts (description => font name)

dbTableExists()

Returns if the given table name exists

dbTableExists(PDO $pdo, string $tableName) : bool
Parameters
$pdo : PDO

PDO

$tableName : string

table name

Return values
bool

true if existing

_get_schema_dn()

Helper for _get_raw_schema() which fetches the DN of the schema object in an LDAP server based on a DN. Entries should set the subSchemaSubEntry attribute pointing to the DN of the server schema. You can specify the DN whose subSchemaSubEntry you wish to retrieve of specify an empty string to fetch the subScehamSubEntry from the Root DSE.

_get_schema_dn(string $dn[, bool $debug = false ]) : string
Parameters
$dn : string

The DN (may be null) which houses the subschemaSubEntry attribute which this function can use to determine the schema entry's DN.

$debug : bool = false

Switch to true to see some nice and copious output. :)

Return values
string

The DN of the entry which houses this LDAP server's schema.

_get_raw_schema()

Fetches the raw schema array for the subschemaSubentry of the server. Note, this function has grown many hairs to accommodate more LDAP servers. It is needfully complicated as it now supports many popular LDAP servers that don't necessarily expose their schema "the right way".

_get_raw_schema( $schema_to_fetch[,  $dn = '' ]) : an
Parameters
$schema_to_fetch :
  • A string indicating which type of schema to fetch. Five valid values: 'objectclasses', 'attributetypes', 'ldapsyntaxes', 'matchingruleuse', or 'matchingrules'. Case insensitive.
$dn : = ''

(optional) This parameter is the DN of the entry whose schema you would like to fetch. Entries have the option of specifying their own subschemaSubentry that points to the DN of the system schema entry which applies to this attribute. If unspecified, this will try to retrieve the schema from the RootDSE subschemaSubentry. Failing that, we use some commonly known schema DNs. Default value is the Root DSE DN (zero-length string)

Return values
an

array of strings of this form: Array ( [0] => "( 1.3.6.1.4.1.7165.1.2.2.4 NAME 'gidPool' DESC 'Pool ... [1] => "( 1.3.6.1.4.1.7165.2.2.3 NAME 'sambaAccount' DESC 'Sa ... etc.

get_schema_objectclasses()

Gets an associative array of ObjectClass objects for the specified server. Each array entry's key is the name of the objectClass in lower-case and the value is an ObjectClass object.

get_schema_objectclasses([string $dn = null ][, mixed $use_cache = true ]) : array<string|int, ObjectClass>
Parameters
$dn : string = null

(optional) It is easier to fetch schema if a DN is provided which defines the subschemaSubEntry attribute (all entries should).

$use_cache : mixed = true
Tags
see
ObjectClass
see
get_schema_objectclass
Return values
array<string|int, ObjectClass>

An array of ObjectClass objects.

get_schema_objectclass()

Gets a single ObjectClass object specified by name.

get_schema_objectclass(string $oclass_name[, string $dn = null ][, mixed $use_cache = true ]) : ObjectClass
Parameters
$oclass_name : string

The name of the objectClass to fetch.

$dn : string = null

(optional) It is easier to fetch schema if a DN is provided which defines the subschemaSubEntry attribute (all entries should).

$use_cache : mixed = true
Tags
see
ObjectClass
see
get_schema_objectclasses
Return values
ObjectClass

The specified ObjectClass object or false on error.

get_schema_attribute()

Gets a single AttributeType object specified by name.

get_schema_attribute(mixed $attr_name[, string $dn = null ][, mixed $use_cache = true ]) : AttributeType
Parameters
$attr_name : mixed
$dn : string = null

(optional) It is easier to fetch schema if a DN is provided which defines the subschemaSubEntry attribute (all entries should).

$use_cache : mixed = true
Tags
see
AttributeType
see
get_schema_attributes
Return values
AttributeType

The specified AttributeType object or false on error.

get_schema_attributes()

Gets an associative array of AttributeType objects for the specified server. Each array entry's key is the name of the attributeType in lower-case and the value is an AttributeType object.

get_schema_attributes([string $dn = null ][, mixed $use_cache = true ]) : array<string|int, mixed>
Parameters
$dn : string = null

(optional) It is easier to fetch schema if a DN is provided which defines the subschemaSubEntry attribute (all entries should).

$use_cache : mixed = true
Return values
array<string|int, mixed>

An array of AttributeType objects.

add_aliases_to_attrs()

For each attribute that has multiple names, this function adds unique entries to the attrs array for those names. Ie, attributeType has name 'gn' and 'givenName'.

add_aliases_to_attrs(mixed &$attrs) : mixed

This function will create a unique entry for 'gn' and 'givenName'.

Parameters
$attrs : mixed
Return values
mixed

add_sup_to_attrs()

Adds inherited values to each attributeType specified by the SUP directive.

add_sup_to_attrs(mixed &$attrs, mixed &$attrs_oid) : mixed

Supports infinite levels of inheritance. Bug 856832: require a second parameter that has all attributes indexed by OID

Parameters
$attrs : mixed
$attrs_oid : mixed
Return values
mixed

get_schema_matching_rules()

Returns an array of MatchingRule objects for the specified server.

get_schema_matching_rules([mixed $dn = null ][, mixed $use_cache = true ]) : mixed

The key of each entry is the OID of the matching rule.

Parameters
$dn : mixed = null
$use_cache : mixed = true
Return values
mixed

get_schema_syntaxes()

Returns an array of Syntax objects that this LDAP server uses mapped to their descriptions. The key of each entry is the OID of the Syntax.

get_schema_syntaxes([mixed $dn = null ][, mixed $use_cache = true ]) : mixed
Parameters
$dn : mixed = null
$use_cache : mixed = true
Return values
mixed

cached_schema_available()

Returns true if the schema for $schema_type has been cached and is available. $schema_type may be one of (lowercase) the following: objectclasses attributetypes ldapsyntaxes matchingrules matchingruleuse Note that _get_raw_schema() takes a similar parameter.

cached_schema_available(mixed $schema_type) : mixed
Parameters
$schema_type : mixed
Return values
mixed

get_cached_schema()

Returns the cached array of schemaitem objects for the specified $schema_type. For list of valid $schema_type values, see above schema_cache_available(). Note that internally, this function utilizes a two-layer cache, one in memory using a static variable for multiple calls within the same page load, and one in a session for multiple calls within the same user session (spanning multiple page loads).

get_cached_schema(mixed $schema_type) : mixed

Returns an array of SchemaItem objects on success or false on failure.

Parameters
$schema_type : mixed
Return values
mixed

set_cached_schema()

Caches the specified $schema_type.

set_cached_schema(mixed $schema_type, mixed $schema_items) : mixed

$schema_items should be an array of SchemaItem instances (ie, an array of ObjectClass, AttributeType, LDAPSyntax, MatchingRuleUse, or MatchingRule objects.

Returns true on success of false on failure.

Parameters
$schema_type : mixed
$schema_items : mixed
Return values
mixed

set_schema_cache_unavailable()

Sets the schema entry for the server_id to be "unavailable" so that we realize that we tried to get the schema but could not, so quit trying next time to fetch it from the server.

set_schema_cache_unavailable() : mixed
Return values
mixed

isLAMProVersion()

Returns if this is a LAM Pro installation.

isLAMProVersion() : bool
Return values
bool

LAM Pro installation

getSelfServiceSearchAttributes()

Returns a list of possible search attributes for the self service.

getSelfServiceSearchAttributes(string $scope) : array<string|int, mixed>
Parameters
$scope : string

account type

Return values
array<string|int, mixed>

attributes

getSelfServiceFieldSettings()

Returns the field settings for the self service.

getSelfServiceFieldSettings(string $scope) : array<string|int, mixed>
Parameters
$scope : string

account type

Return values
array<string|int, mixed>

settings

getSelfServiceOptions()

Returns meta HTML code for each self service field.

getSelfServiceOptions(string $scope, array<string|int, mixed> $fields, array<string|int, mixed> $attributes, bool $passwordChangeOnly, array<string|int, mixed> $readOnlyFields) : array<string|int, mixed>
Parameters
$scope : string

account type

$fields : array<string|int, mixed>

input fields (array(<moduleName> => array(, , ...)))

$attributes : array<string|int, mixed>

LDAP attributes (attribute names in lower case)

$passwordChangeOnly : bool

indicates that the user is only allowed to change his password and no LDAP content is readable

$readOnlyFields : array<string|int, mixed>

list of read-only fields

Return values
array<string|int, mixed>

meta HTML code (array(<moduleName> => htmlResponsiveRow))

checkSelfServiceOptions()

Checks if all input values are correct and returns the LDAP commands which should be executed.

checkSelfServiceOptions(string $scope, string $fields, array<string|int, mixed> $attributes, bool $passwordChangeOnly, array<string|int, mixed> $readOnlyFields) : array<string|int, mixed>
Parameters
$scope : string

account type

$fields : string

input fields (array(<moduleName> => array(, , ...)))

$attributes : array<string|int, mixed>

LDAP attributes

$passwordChangeOnly : bool

indicates that the user is only allowed to change his password and no LDAP content is readable

$readOnlyFields : array<string|int, mixed>

list of read-only fields

Return values
array<string|int, mixed>

messages and LDAP commands (array('messages' => [], 'add' => [], 'del' => [], 'mod' => []))

getSelfServiceSettings()

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

getSelfServiceSettings(string $scope, selfServiceProfile $profile) : array<string|int, mixed>
Parameters
$scope : string

account type

$profile : selfServiceProfile

currently edited profile

Return values
array<string|int, mixed>

configuration options

checkSelfServiceSettings()

Checks if the self service settings are valid

checkSelfServiceSettings(string $scope, array<string|int, mixed> &$options, selfServiceProfile &$profile) : array<string|int, mixed>
Parameters
$scope : string

account type

$options : array<string|int, mixed>

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

$profile : selfServiceProfile

profile

Return values
array<string|int, mixed>

list of error messages

isSelfService()

Returns if script runs inside self service.

isSelfService() : bool
Return values
bool

is self service

openSelfServiceLdapConnection()

Opens the LDAP connection and returns the handle. No bind is done.

openSelfServiceLdapConnection(selfServiceProfile $profile) : handle
Parameters
$profile : selfServiceProfile

profile

Return values
handle

LDAP handle or null if connection failed

bindLdapUser()

Binds the LDAP connections with given user and password.

bindLdapUser(handle $handle, mixed $profile, string $userDn, string $password) : bool
Parameters
$handle : handle

LDAP handle

$profile : mixed
$userDn : string

bind DN

$password : string

bind password

Return values
bool

binding successful

compareNodeByIdAsDn()

Compares two nodes by interpreting their ID as DN.

compareNodeByIdAsDn( $a,  $b) : int
Parameters
$a :

first node

$b :

second node

Return values
int

result

compareByAttributes()

Compares two arrays with LDAP attributes by global $lamOrderByAttribute.

compareByAttributes( $a,  $b) : int
Parameters
$a :

first node

$b :

second node

Return values
int

result

getTypes()

Returns a list of available account types.

getTypes() : array<string|int, mixed>
Return values
array<string|int, mixed>

list of types

getTypeDescription()

Returns the description of an account type.

getTypeDescription(string $type) : string
Parameters
$type : string

type name

Return values
string

type description

getScopeFromTypeId()

Returns the account type for a given type id.

getScopeFromTypeId(string $typeId) : string
Parameters
$typeId : string

type id (e.g. user_1)

Return values
string

scope (e.g. user)

cleanDn()

Cleans the given DN from GET.

cleanDn(string $dn) : string
Parameters
$dn : string

DN

Return values
string

cleaned DN

printContent()

Displays the content area

printContent([htmlStatusMessage $message = null ][, bool $showPasswordInputs = true ]) : void
Parameters
$message : htmlStatusMessage = null

status message

$showPasswordInputs : bool = true

show password input fields

Return values
void

showLoginDialog()

Shows the login dialog for the configuration master password.

showLoginDialog([htmlStatusMessage $message = null ]) : void
Parameters
$message : htmlStatusMessage = null

message to show if any error occurred

Return values
void

Renders the link back to login page.

renderBackLink() : void
Return values
void

displayImportExport()

Displays the import/export functions.

displayImportExport() : void
Return values
void

checkInput()

Checks user input and saves the entered settings.

checkInput() : array<string|int, mixed>
Return values
array<string|int, mixed>

list of errors

checkInput()

Checks user input and saves the entered settings.

checkInput() : array<string|int, mixed>
Return values
array<string|int, mixed>

list of errors

checkInput()

Checks user input and saves the entered settings.

checkInput() : array<string|int, mixed>
Return values
array<string|int, mixed>

list of errors

compareTypesByAlias()

Compares types by alias for sorting.

compareTypesByAlias(baseType $a, baseType $b) : int
Parameters
$a : baseType

first type

$b : baseType

second type

Return values
int

comparison result

formatSSLTimestamp()

Formats an LDAP time string (e.g. from createTimestamp).

formatSSLTimestamp(string $time) : string
Parameters
$time : string

LDAP time value

Return values
string

formatted time

checkInput()

Checks user input and saves the entered settings.

checkInput() : array<string|int, mixed>
Return values
array<string|int, mixed>

list of errors

getChildCount()

Returns the number of child entries of a DN.

getChildCount(string $dn) : int
Parameters
$dn : string

DN of parent

Return values
int

number of children

echoHTMLHead()

Print HTML header of the help page.

echoHTMLHead() : void
Return values
void

echoHTMLFoot()

Print HTML footer of the help page.

echoHTMLFoot() : void
Return values
void

displayHelp()

Print help site for a specific help number.

displayHelp(array<string|int, mixed> $helpEntry) : void
Parameters
$helpEntry : array<string|int, mixed>

the help entry that is to be displayed.

Return values
void

search_username()

Searches LDAP for a specific user name (uid attribute) and returns its DN entry

search_username(string $name) : string
Parameters
$name : string

user name

Return values
string

DN

display_LoginPage()

Displays the login window.

display_LoginPage(LAMLicenseValidator|null $licenseValidator, string|null $error_message[, string|null $errorDetails = null ][, string|null $extraMessage = null ]) : void
Parameters
$licenseValidator : LAMLicenseValidator|null

license validator

$error_message : string|null

error message to display

$errorDetails : string|null = null

error details

$extraMessage : string|null = null

extra message that is shown as info

Tags
throws
LAMException

error rendering login page

Return values
void

displayLoginHeader()

Displays the header on the login page.

displayLoginHeader() : void
Return values
void

printHeader()

Prints the page header.

printHeader() : void
Return values
void

printFooter()

Prints the page footer.

printFooter() : void
Return values
void

importStructures()

Imports the selected PDF structures.

importStructures(string $typeId, array<string|int, mixed> $options, array<string|int, LAMConfig&$serverProfiles, TypeManager &$typeManager) : htmlStatusMessage
Parameters
$typeId : string

type id

$options : array<string|int, mixed>

options

$serverProfiles : array<string|int, LAMConfig>

server profiles (name => profile object)

$typeManager : TypeManager

type manager

Return values
htmlStatusMessage

message or null

exportStructures()

Exports the selected account profile.

exportStructures(string $typeId, string $name, array<string|int, mixed> $options, array<string|int, LAMConfig&$serverProfiles, TypeManager &$typeManager) : htmlStatusMessage
Parameters
$typeId : string

source type id

$name : string

profile name

$options : array<string|int, mixed>

options

$serverProfiles : array<string|int, LAMConfig>

server profiles (name => profile object)

$typeManager : TypeManager

type manager

Return values
htmlStatusMessage

message or null

translateFieldIDToName()

Translates a given field ID (e.g. inetOrgPerson_givenName) to its descriptive name.

translateFieldIDToName(string $id, string $scope, array<string|int, mixed> $availablePDFFields) : string|null
Parameters
$id : string

field ID

$scope : string

account type

$availablePDFFields : array<string|int, mixed>

available PDF fields

Return values
string|null

field label or null if no matching module found

updateBasicSettings()

Updates basic settings such as logo and head line.

updateBasicSettings(PDFStructure &$structure, array<string|int, PdfLogo$logoFiles) : void
Parameters
$structure : PDFStructure

PDF structure

$logoFiles : array<string|int, PdfLogo>

logos

Return values
void

updateSectionTitles()

Updates section titles.

updateSectionTitles(PDFStructure &$structure) : void
Parameters
$structure : PDFStructure

PDF structure

Return values
void

addSection()

Adds a new section if requested.

addSection(PDFStructure &$structure) : void
Parameters
$structure : PDFStructure

PDF structure

Return values
void

addSectionEntry()

Adds a new entry to a section if requested.

addSectionEntry(PDFStructure &$structure) : void
Parameters
$structure : PDFStructure

PDF structure

Return values
void

removeItem()

Removes a section or entry if requested.

removeItem(PDFStructure &$structure) : void
Parameters
$structure : PDFStructure

PDF structure

Return values
void

moveUp()

Moves up a section or entry if requested.

moveUp(PDFStructure &$structure) : void
Parameters
$structure : PDFStructure

PDF structure

Return values
void

moveDown()

Moves down a section or entry if requested.

moveDown(PDFStructure &$structure) : void
Parameters
$structure : PDFStructure

PDF structure

Return values
void

importProfiles()

Imports the selected account profiles.

importProfiles(string $typeId, array<string|int, mixed> $options, array<string|int, LAMConfig&$serverProfiles, TypeManager &$typeManager) : htmlStatusMessage
Parameters
$typeId : string

type id

$options : array<string|int, mixed>

options

$serverProfiles : array<string|int, LAMConfig>

server profiles (name => profile object)

$typeManager : TypeManager

type manager

Return values
htmlStatusMessage

message or null

exportProfiles()

Exports the selected account profile.

exportProfiles(string $typeId, string $name, array<string|int, mixed> $options, array<string|int, LAMConfig&$serverProfiles, TypeManager &$typeManager) : htmlStatusMessage
Parameters
$typeId : string

source type id

$name : string

profile name

$options : array<string|int, mixed>

options

$serverProfiles : array<string|int, LAMConfig>

server profiles (name => profile object)

$typeManager : TypeManager

type manager

Return values
htmlStatusMessage

message or null

testRemoteCommand()

Runs a test case of lamdaemon.

testRemoteCommand(string $command, bool $stopTest, Remote $remote, string $testText, htmlResponsiveRow $container) : bool
Parameters
$command : string

test command

$stopTest : bool

specifies if test should be run

$remote : Remote

SSH connection

$testText : string

describing text

$container : htmlResponsiveRow

container for HTML output

Return values
bool

true, if errors occurred

lamRunTestSuite()

Runs all tests for a given server.

lamRunTestSuite(string $serverName, string $serverTitle, bool $testQuota, htmlResponsiveRow $container) : void
Parameters
$serverName : string

server ID

$serverTitle : string

server name

$testQuota : bool

true, if Quotas should be checked

$container : htmlResponsiveRow

container for HTML output

Return values
void

checkSchemaForModule()

Checks if the object classes and attributes for this module are available.

checkSchemaForModule(string $name, string $scope, string $typeId) : string
Parameters
$name : string

module name

$scope : string

type (user, group, ...)

$typeId : string

type id

Return values
string

error message or null

getRecursiveAttributesFromObjectClass()

Returns the names of all attributes which are managed by the given object class and its parents.

getRecursiveAttributesFromObjectClass(ObjectClass $oClass) : array<string|int, mixed>
Parameters
$oClass : ObjectClass

object class

Return values
array<string|int, mixed>

list of attribute names

printImportTabContent()

Prints the content area for the import tab.

printImportTabContent() : void
Return values
void

printImportTabProcessing()

Prints the content area for the import tab during processing state.

printImportTabProcessing() : void
Return values
void

checkImportData()

Checks if the import data is ok.

checkImportData() : void
Tags
throws
LAMException

error message if not valid

Return values
void

printExportTabContent()

Prints the content area for the export tab.

printExportTabContent() : void
Return values
void

getDefaultBaseDn()

Returns the default base DN.

getDefaultBaseDn() : string
Return values
string

base DN

isValidExportDn()

Checks if the given DN is valid for exporting.

isValidExportDn(string $dn) : bool
Parameters
$dn : string

DN

Return values
bool

valid

printExportTabProcessing()

Prints the content area for the export tab during processing state.

printExportTabProcessing() : void
Return values
void

checkExportData()

Checks if the export data is ok.

checkExportData() : void
Tags
throws
LAMException

error message if not valid

Return values
void

displayStartPage()

Displays the main page of the multi edit tool.

displayStartPage() : void
Return values
void

runAjaxActions()

Performs the modify operations.

runAjaxActions() : void
Return values
void

readLDAPData()

Reads the LDAP entries from the directory.

readLDAPData() : array<string|int, mixed>
Return values
array<string|int, mixed>

status

generateActions()

Generates the required actions based on the read LDAP data.

generateActions() : array<string|int, mixed>
Return values
array<string|int, mixed>

status

dryRun()

Prints the dryRun output.

dryRun() : array<string|int, mixed>
Return values
array<string|int, mixed>

status

multiEditLdapErrorHandler()

Error handler

multiEditLdapErrorHandler(int $errno, string $errstr, string $errfile, int $errline) : void
Parameters
$errno : int

error number

$errstr : string

error message

$errfile : string

error file

$errline : int

error line

Return values
void

doModify()

Runs the actual modifications.

doModify() : array<string|int, mixed>
Return values
array<string|int, mixed>

status

display_main()

Displays the main page of the OU editor

display_main(string|null $message, string|null $error) : void
Parameters
$message : string|null

info message

$error : string|null

error message

Return values
void

showTree()

showTree() : void
Return values
void

massPrintBackButton()

Prints a back button to the page where the user enters a file to upload.

massPrintBackButton(string $typeId, array<string|int, string> $selectedModules, htmlResponsiveRow &$container) : void
Parameters
$typeId : string

account type (e.g. user)

$selectedModules : array<string|int, string>

selected modules for upload

$container : htmlResponsiveRow

table container

Return values
void

showMainPage()

Displays the account type specific main page of the upload.

showMainPage(ConfiguredType $type, array<string|int, string> $selectedModules) : void
Parameters
$type : ConfiguredType

account type

$selectedModules : array<string|int, string>

list of selected account modules

Return values
void

extractWildcards()

Extracts any wildcards from the value field.

extractWildcards(string $value) : array<string|int, mixed>
Parameters
$value : string

value field

Return values
array<string|int, mixed>

wildcard attributes

replaceWildcards()

Replaces wildcards in the user entered value.

replaceWildcards(string $value, array<string|int, mixed> $entry) : string
Parameters
$value : string

user entered value

$entry : array<string|int, mixed>

LDAP entry

Return values
string

result

setMimeType()

Sets the mime type.

setMimeType(string $fileName) : void
Parameters
$fileName : string

file name

Return values
void

Search results