ADD
public
mixed
ADD
= 'add'
public
mixed
ADD
= 'add'
public
mixed
DEL
= 'del'
font size
public
mixed
LAMPDF_FONT_SIZE
= 7
font size for bigger text
public
mixed
LAMPDF_FONT_SIZE_BIG
= 10
width of a label
public
mixed
LAMPDF_LABELWIDTH
= 50
line height
public
mixed
LAMPDF_LINEHEIGHT
= 5
line width
public
mixed
LAMPDF_LINEWIDTH
= 190
public
mixed
MOD
= 'mod'
File header
public
mixed
SAMBA_MUNGEDDIAL_FILEHEADER
= "20002000200020002000200020002000" . "20002000200020002000200020002000" . "20002000200020002000200020002000" . "20002000200020002000200020002000" . "20002000200020002000200020002000" . "20002000200020002000200020002000" . "5000"
File header for old format.
public
mixed
SAMBA_MUNGEDDIAL_FILEHEADER_OLD
= "6d000800200020002000200020002000" . "20002000200020002000200020002000" . "20002000200020002000200064000100" . "20002000200020002000200020002000" . "20002000200020002000200020002000" . "20002000200020002000200020002000" . "50001000"
public
mixed
STAGE_ACTIONS_CALCULATED
= 'actionsCalculated'
public
mixed
STAGE_FINISHED
= 'finished'
public
mixed
STAGE_READ_FINISHED
= 'readFinished'
public
mixed
STAGE_START
= 'start'
public
mixed
STAGE_WRITING
= 'writing'
This function will return all values from $array without values of $values.
array_delete(array<string|int, mixed> $values, array<string|int, mixed> $array) : array<string|int, mixed>
list of values which should be removed
list of original values
list of remaining values
Checks if a string exists in an array, ignoring case.
in_array_ignore_case(string $needle, array<string|int, mixed> $haystack) : mixed
search string
array
This function will return the days from 1.1.1970 until now.
getdays() : number
of days
Takes a list of Samba flags and creates the corresponding flag string.
smbflag(array<string|int, mixed> $input) : string
is an array of Samba flags (e.g. X or D)
Samba flag string
Generates the NT hash of a password.
ntPassword(mixed $password) : string
password hash
Returns the hash value of a plain text password.
pwd_hash(string $password[, bool $enabled = true ][, string $hashType = 'SSHA' ]) : string
the password string
marks the hash as enabled/disabled (e.g. by prefixing "!")
password hash type (CRYPT, CRYPT-SHA512, SHA, SSHA, MD5, SMD5, PLAIN, K5KEY)
the password hash
Returns the hash type of the given password hash.
getHashType(string|null $hash) : string
This will return PLAIN if no supported hash type was found.
password hash
type (e.g. SSHA)
Returns the list of supported hash types (e.g. SSHA).
getSupportedHashTypes() : array<string|int, mixed>
hash types
Calculates a password salt of the given length.
generateSalt(int $len) : string
salt length
the salt string
Marks an password hash as enabled and returns the new hash string
pwd_enable(string $hash) : string
hash value to enable
enabled password hash
Marks an password hash as disabled and returns the new hash string
pwd_disable(string $hash) : string
hash value to disable
disabled hash value
Checks if a Unix password can be locked.
pwd_is_lockable(string $password) : bool
This checks if the password is not plain text but e.g. contains {SSHA}.
password value
can be locked
Checks if a password hash is enabled/disabled
pwd_is_enabled(string $hash) : bool
password hash to check
true if the password is marked as enabled
Generates a random password with 14 digits by default.
generateRandomPassword([int $length = 14 ][, bool $checkStrength = true ]) : string
length of password (defaults to 14)
check if password matches the policy
password
Generates a random text with 20 letters by default.
generateRandomText([int $length = 20 ]) : string
length of password (defaults to 20)
text
Checks if the given password matches the crypto hash.
checkPasswordHash(mixed $type, string $hash, string $password) : bool
password hash value
plain text password to check
hash matches
Returns the number of character classes in a password.
getNumberOfCharacterClasses(string $password) : int
password
number of classes
Returns an array with all Samba 3 domain entries under the given suffix
search_domains([mixed $server = null ][, string $suffix = null ]) : array<string|int, mixed>
LDAP suffix to search (if null then $_SESSION['config']->get_Suffix('smbDomain') is used)
list of samba3domain objects
Checks if a given value matches the selected regular expression.
get_preg(string $argument, string $regexp) : bool
value to check
pattern name
true if matches, otherwise false
Converts the comma escaping from Windows to OpenLDAP style.
convertCommaEscaping(string $dn) : string
DN
DN
Connects to an LDAP server using the given URL.
connectToLDAP(string $serverURL, mixed $startTLS) : mixed
URL
This will search the given LDAP suffix for all entries which have the given attribute.
searchLDAPByAttribute(string $name, string $value, string $objectClass, array<string|int, mixed> $attributes, array<string|int, mixed> $scopes) : array<string|int, mixed>
attribute name (may be null)
attribute value
object class (may be null)
list of attributes to return
account types
list of found entries
This will search the given LDAP suffix for all entries which match the given filter.
searchLDAPByFilter(string $filter, array<string|int, mixed> $attributes, array<string|int, mixed> $scopes[, bool $attrsOnly = false ]) : array<string|int, mixed>
list of attributes to return
account types
get only attributes but no values (default: false)
list of found entries
Runs an LDAP search.
searchLDAP(string $suffix, string $filter, array<string|int, mixed> $attributes[, int $limit = -1 ]) : array<string|int, mixed>
LDAP suffix
filter
list of attributes to return
result limit
list of found entries
Returns the LDAP server handle.
getLDAPServerHandle() : handle
LDAP handle
Runs an LDAP search and uses paging if configured.
searchLDAPPaged(handle $server, string $dn, string $filter, array<string|int, mixed> $attributes, bool $attrsOnly, int $limit) : array<string|int, mixed>
LDAP connection handle
DN
filter
attribute list
return only attribute names
size limit
results
Returns the given DN.
ldapGetDN(string $dn[, array<string|int, mixed> $attributes = array('dn') ][, handle $handle = null ]) : array<string|int, mixed>|null
DN
list of attributes to fetch
LDAP handle (optional for admin interface pages)
attributes or null if not found
Returns the DN and children of a given DN.
ldapListDN(string $dn[, string $filter = '(objectclass=*)' ][, array<string|int, mixed> $attributes = array('dn') ][, handle $handle = null ][, int $limit = -1 ]) : array<string|int, mixed>
DN
LDAP filter
list of attributes to fetch
LDAP handle (optional for admin interface pages)
result limit
attributes or null if not found
Deletes a DN and all child entries.
deleteDN(string $dn, bool $recursive) : array<string|int, mixed>
DN to delete
recursive delete also child entries
error messages
Performs a recursive copy from old DN under target DN.
copyDnRecursive(string $oldDn, string $targetDn) : void
old DN to copy
copy nodes under this DN
Moves an LDAP entry.
moveDn(string $oldDn, string $targetDn) : void
old DN
target container DN
Returns the parameters for a StatusMessage of the last LDAP search.
getLastLDAPError() : array<string|int, mixed>
parameters for StatusMessage or null if all was ok
Cleans the result of an LDAP search.
cleanLDAPResult(array<string|int, mixed> &$entries) : mixed
This will remove all 'count' entries and also all numeric array keys.
LDAP entries in format $entries[entry number][attribute name][attribute values]
Transforms a DN into a more user friendly format.
getAbstractDN(string $dn) : string
E.g. "dc=company,dc=de" is transformed to "company > de".
DN
transformed DN
Unescapes LDAP special characters for readability.
unescapeLdapSpecialCharacters(string $dn) : string
escaped DN
unescaped DN
Callback function for unescaping DN.
unescapeLdapSpecialCharactersCallback(array<string|int, mixed> $matches) : string
HEX value that was found
unescaped string
Helper function to sort DNs.
compareDN(string $a, string $b) : int
first argument to compare
second argument to compare
0 if equal, 1 if $a is greater, -1 if $b is greater
Helper function to sort LDAP entries by DN.
compareLDAPEntriesByDn(array<string|int, mixed> $a, array<string|int, mixed> $b) : int
first argument to compare
second argument to compare
0 if equal, 1 if $a is greater, -1 if $b is greater
Formats an LDAP time string (e.g. from createTimestamp).
formatLDAPTimestamp(string $time) : string
LDAP time value
formatted time
Parses an LDAP time stamp and returns a DateTime in current time zone.
parseLDAPTimestamp(string $time) : DateTime
LDAP time value
time
Simple function to obfuscate strings.
obfuscateText(string $text) : mixed
text to obfuscate
Simple function to deobfuscate strings.
deobfuscateText(string $text) : mixed
text to deobfuscate
Checks if the given text is obfuscated.
isObfuscatedText(string $text) : bool
text to check
obfuscated or not
Extracts the RDN attribute name from a given DN.
extractRDNAttribute(string $dn) : string
DN
RDN attribute name
Extracts the RDN attribute value from a given DN.
extractRDNValue(string $dn) : string
DN
RDN attribute value
Extracts the RDN part of the DN.
extractRDN(string|null $dn) : string|null
DN
RDN part
Extracts the DN suffix from a given DN.
extractDNSuffix(string $dn) : string
E.g. ou=people,dc=test,dc=com will result in dc=test,dc=com.
DN
DN suffix
Checks if the SMTP connection with the given settings is fine.
testSmtpConnection(string $server, string $user, string $password, string $encryption) : void
SMTP server
user name
password
encryption type
Sends the password mail.
sendPasswordMail(string $pwd, array<string|int, mixed> $user[, string $recipient = null ]) : array<string|int, mixed>
new password
LDAP attributes of user
recipient address (optional, $user['mail'][0] used by default)
list of arrays that can be used to create status messages
Sends out an email.
sendEMail(string|array<string|int, mixed> $to, string $subject, string $text, string $from, bool $isHTML[, string $replyTo = null ][, string $cc = null ][, string $bcc = null ]) : mixed
TO address
email subject
mail body (with \r\n EOL)
FROM address
HTML format
REPLY-TO address (optional)
CC address (optional)
BCC address (optional)
Checks if an email address is safe for use on commandline
isCommandlineSafeEmailAddress( $address) : bool
is safe
Returns a random number.
getRandomNumber() : int
random number
Connects to the LDAP server and extracts the certificates.
getLDAPSSLCertificate(string $server, string $port) : mixed
server name
server port
false on error and certificate if extracted successfully
Returns the extended LDAP error message if any.
getExtendedLDAPErrorMessage(handle $server) : string
LDAP server handle
error message
Returns the default error message to display on the web page.
getDefaultLDAPErrorString(handle $server) : string
HTML special characters are already escaped.
LDAP server handle
error message
Returns if the last LDAP error was due to expired password or forced password change (AD only).
ldapIsPasswordExpired( $server) : bool
password expired
Tries to get additional information why invalid credentials was returned. E.g. account is locked.
getExtraInvalidCredentialsMessage(handle $ldap, string $userDn) : string
LDAP object to connect for getting extra data
failed DN
extra message
Returns the URL under which the page was loaded.
getCallingURL([ $baseUrl = '' ]) : string
This includes any GET parameters set.
URL
Returns the offset in hours from configured time zone to GMT.
getTimeZoneOffsetHours() : int
offset
Returns the configured time zone.
getTimeZone() : DateTimeZone
time zone
Returns the current time in formatted form.
getFormattedTime(unknown $format) : mixed
format to use (e.g. 'Y-m-d H:i:s')
Formats a number of seconds to a more human readable format with minutes, hours, etc.
formatSecondsToShortFormat(int $numSeconds) : string
E.g. 70 seconds will return 1m10s.
number of seconds
formatted number
Unformats text like 1m10s back to number of seconds.
unformatShortFormatToSeconds(string $text) : int
formatted text
number of seconds
Checks if the user is logged in. Stops script execution if not.
enforceUserIsLoggedIn([bool $check2ndFactor = true ]) : mixed
check if the 2nd factor was provided if required
Prints the content of the header part.
printHeaderContents(string $title, string $prefix) : mixed
page title
prefix to LAM main folder (e.g. "..")
Prints script tags for all LAM JS files.
printJsIncludes(string $prefix) : mixed
prefix to LAM main folder (e.g. "..")
Converts an UTF-8 string to UTF16LE.
convertUtf8ToUtf16Le(string $input) : mixed
UTF-8 value
Returns the text with LAM and its version for header area.
getLAMVersionText() : string
LAM version text
Returns if the given release is a developer version.
isDeveloperVersion(mixed $version) : bool
is developer version
Sets the environment variables for custom SSL CA certificates.
setSSLCaCert() : mixed
Sets language settings for automatic translation
setlanguage() : mixed
Checks whether a specific flag in the rights string is set.
checkChmod(string $right, string $target, string $chmod) : mixed
read, write or execute
owner, group or other
the chmod rights
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).
version number
Extracts config options from HTTP POST data.
extractConfigOptionsFromPOST(array<string|int, mixed> $confTypes) : array<string|int, mixed>
array (option name => type (e.g. multiselect))
list of config options (name =>[values])
Prints a meta refresh page
metaRefresh(string $page) : mixed
the URL of the target page
Checks if the given account type is hidden.
isAccountTypeHidden(string $type) : bool
account type (e.g. user)
is hidden
Returns a list of all supported languages.
getLanguages() : array<string|int, LAMLanguage>
languages
Returns the marker for required values.
htmlGetRequiredMarker() : string
HTML code for required marker
Returns the marker for required values.
htmlGetRequiredMarkerElement() : htmlSpan
HTML code for required marker
Checks if the given IP is valid.
check_ip(string $ip[, bool $subnet = false ]) : mixed
IP address
IP must be a subnet
Returns the alias name of a module
getModuleAlias(string $name, string $scope) : string|null
the module name
the account type ("user", "group", "host")
alias name
Returns true if the module is a base module
is_base_module(string $name, string $scope) : bool
the module name
the account type ("user", "group", "host")
true if base module
Returns the LDAP filter used by the account lists
get_ldap_filter(string $typeId) : string
the account type ("user", "group", "host")
LDAP filter
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.
account type (user, group, host)
return only RDN attributes of these modules
list of LDAP attributes
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.
the account type (user, group, host)
dependencies
Checks if there are missing dependencies between modules.
check_module_depends(array<string|int, mixed> $selected, array<string|int, mixed> $deps) : mixed
selected module names
module dependencies
false if no missing dependency was found, otherwise an array of array(selected module, depending module) if missing dependencies were found
Checks if there are conflicts between modules
check_module_conflicts(array<string|int, mixed> $selected, array<string|int, mixed> $deps) : bool
selected module names
module dependencies
false if no conflict was found, otherwise an array of array(selected module, conflicting module) if conflicts were found
Returns an array with all available user module names
getAvailableModules(string $scope[, bool $mustSupportAdminInterface = false ]) : array<string|int, mixed>
account type (user, group, host)
module must support LAM admin interface (default: false)
list of possible modules
Returns an array with all modules.
getAllModules() : array<string|int, baseModule>
list of modules
Returns the elements for the profile page.
getProfileOptions(string $typeId) : array<string|int, mixed>
account type (user, group, host)
profile elements
Checks if the profile options are valid
checkProfileOptions(string $typeId, array<string|int, mixed> $options) : array<string|int, mixed>
account type (user, group, host)
hash array containing all options (name => array(...))
list of error messages
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>
hash array (module name => array(account types))
configuration options
Checks if the configuration options are valid
checkConfigOptions(array<string|int, mixed> $moduleToTypeIds, array<string|int, mixed> &$options) : array<string|int, mixed>
hash array (module name => array(account type ids))
hash array containing all options (name => array(...))
list of error messages
Returns a help entry from an account module.
getHelp(string $module, string $helpID, string $scope) : array<string|int, mixed>
module name
help identifier
account type
help entry
Returns a list of available PDF entries.
getAvailablePDFFields(string $typeId) : array<string|int, mixed>
account type (user, group, host)
PDF entries (field ID => field label)
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
)
account type
selected account modules
column list
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.
account type
array containing one account in each element
array(<column_name> =>
selected account modules
HTML container
array including accounts or false if there were errors
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>
account type
list of selected account modules
LDAP attributes of this entry (attributes are provided as reference, handle modifications of $attributes with care)
array which contains status messages. Each entry is an array containing the status message parameters.
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>
account type
array containing one account in each element
array(<column_name> =>
list of accounts which were not created successfully
list of selected account modules
list of LDAP entries
current status
array (
'status' => 'finished' | 'inProgress'
'module' =>
'progress' => 0..100
'errors' => array (<array of parameters for StatusMessage>)
)
Returns true if the module is a base module
getRequiredExtensions() : array<string|int, mixed>
required extensions
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.
Name of account module
htmlElement or array of htmlElement elements
List of values which override the defaults in $input (name => value)
If true then no buttons will be displayed
Account type
List of input field names and their type (name => type)
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.
first array
second array
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
help entry
help number
module name
account scope
CSS classes
Starts a session and sets the cookie options.
lam_start_session() : mixed
lamDefaultCookieOptions() : array<string|int, mixed>
Starts a session and checks the environment.
startSecureSession([bool $redirectToLogin = true ][, bool $initSecureData = false ]) : bool
The script is stopped if one of the checks fail (timeout redirection may be overridden).
redirect user to login page (default: true)
init verification data like session ID and client IP (default: false)
true if all ok, false if session expired
Returns if the session uses files storage.
isFileBasedSession() : bool
file based session
Checks if the client's IP address is on the list of allowed IPs.
checkClientIP() : mixed
The script is stopped if the host is not valid.
Logs off the user and displays the login page.
logoffAndBackToLoginPage() : mixed
Returns if debug messages are to be logged.
isDebugLoggingEnabled() : bool
debug enabled
Puts a new message in the log file.
logNewMessage(string $level, string $message) : void
log level (LOG_DEBUG, LOG_NOTICE, LOG_WARNING, LOG_ERR)
log message
Checks if write access to LDAP is allowed.
checkIfWriteAccessIsAllowed([string $scope = null ]) : bool
account type (e.g. user)
true, if allowed
Checks if passwords may be changed.
checkIfPasswordChangeIsAllowed() : bool
true, if allowed
Checks if it is allowed to create new LDAP entries of the given type.
checkIfNewEntriesAreAllowed(string $scope) : bool
This also checks if general write access is enabled.
account type (e.g. 'user')
true, if new entries are allowed
Checks if it is allowed to delete LDAP entries of the given type.
checkIfDeleteEntriesIsAllowed(string $scope) : bool
account type (e.g. 'user')
true, if entries may be deleted
Checks if the password fulfills the password policies.
checkPasswordStrength(string $password, string|array<string|int, mixed> $userNames, array<string|int, mixed> $otherUserAttrs) : mixed
password
user name(s)
user's first/last name
true if ok, string with error message if not valid
Checks the password against the external password service.
checkPwdWithExternalPasswordService(LAMCfgMain $cfg, string $password) : bool
main configuration
password
password accepted as secure
Checks if the given tool is active.
checkIfToolIsActive(string $tool) : mixed
Otherwise, an error message is logged and the execution is stopped (die()).
tool class name (e.g. toolFileUpload)
Returns if the user is logged in.
isLoggedIn() : bool
is logged in
Returns the client IP and comma separated proxy IPs if any (HTTP_X_FORWARDED_FOR, HTTP_X_REAL_IP).
getClientIPForLogging() : string
client IP (e.g. 10.10.10.10,11.11.11.11)
Returns the login dn of the current user.
getLamLdapUser() : string
user DN
Adds a security token to the session to prevent CSRF attacks.
addSecurityTokenToSession([bool $overwrite = true ]) : void
overwrite existing token
Checks if the security token from SESSION matches POST data.
validateSecurityToken() : mixed
Adds a hidden input field to the given meta HTML table.
addSecurityTokenToMetaHTML(htmlTable|htmlGroup|htmlResponsiveRow &$container) : mixed
Should be used to add token at the end of table.
table
Returns the name of the security token parameter.
getSecurityTokenName() : string
name
Returns the value of the security token parameter.
getSecurityTokenValue() : string
value
Sets the X-Frame-Options and Content-Security-Policy header to prevent clickjacking.
setLAMHeaders() : mixed
Encrypts a string
lamEncrypt(string $data[, string $prefix = '' ]) : object
string to encrypt
prefix for cookie names
encrypted string
Decrypts a string
lamDecrypt(object $data[, string $prefix = '' ]) : string
string to decrypt
prefix for cookie names
decrypted string
Returns the encryption algorithm to use.
lamEncryptionAlgo() : string
algorithm name
Logs a message to a remote logging service.
lamLogRemoteMessage(int $level, string $message, LAMCfgMain $cfgMain) : mixed
log level
log message
main configuration
Returns if this is a LAM Pro installation.
isLAMProVersion() : bool
LAM Pro installation
Returns a list of possible search attributes for the self service.
getSelfServiceSearchAttributes(string $scope) : array<string|int, mixed>
account type
attributes
Returns the field settings for the self service.
getSelfServiceFieldSettings(string $scope) : array<string|int, mixed>
account type
settings
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>
account type
input fields (array(<moduleName> => array(
LDAP attributes (attribute names in lower case)
indicates that the user is only allowed to change his password and no LDAP content is readable
list of read-only fields
meta HTML code (array(<moduleName> => htmlResponsiveRow))
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>
account type
input fields (array(<moduleName> => array(
LDAP attributes
indicates that the user is only allowed to change his password and no LDAP content is readable
list of read-only fields
messages and LDAP commands (array('messages' => [], 'add' => [], 'del' => [], 'mod' => []))
Returns a hash array (module name => elements) of all module options for the configuration page.
getSelfServiceSettings(string $scope, selfServiceProfile $profile) : array<string|int, mixed>
account type
currently edited profile
configuration options
Checks if the self service settings are valid
checkSelfServiceSettings(string $scope, array<string|int, mixed> &$options, selfServiceProfile &$profile) : array<string|int, mixed>
account type
hash array containing all options (name => array(...))
profile
list of error messages
Returns if script runs inside self service.
isSelfService() : bool
is self service
Opens the LDAP connection and returns the handle. No bind is done.
openSelfServiceLdapConnection(selfServiceProfile $profile) : handle
profile
LDAP handle or null if connection failed
Binds the LDAP connections with given user and password.
bindLdapUser(handle $handle, mixed $profile, string $userDn, string $password) : bool
LDAP handle
bind DN
bind password
binding successful
This function prints a short status message. It can be used to print INFO, WARN and ERROR messages.
StatusMessage(string $MessageTyp, string $MessageHeadline[, string $MessageText = '' ][, array<string|int, mixed> $MessageVariables = [] ][, bool $returnOutput = false ]) : string
The type of the message to be printed. It must be one of
the following types: 'INFO', 'WARN' or 'ERROR'.
Every other type will lead to an error message indicating an invalid message type.
The headline of the status message.
It may be formatted with special color/link/bold tags.
The text of the status message.
It may be formatted with special color/link/bold tags. This parameter is optional.
The variables that are used to replace the spacers (%s) in the submitted text. This parameter is optional.
if set to true this function will return the generated HTML code instead of printing it directly (default: false)
HTML code if $returnOutput is set to true, otherwise null
Returns the tools which are available for LAM.
getTools() : array<string|int, mixed>
list of LAMTool objects