\

Namespaces

LAM

Interfaces

LAMTool Represents a tool.
passwordService This interface needs to be implemented by all account modules which manage passwords.

Classes

account Manages the object class "account" for users and hosts.
accountContainer This class includes all modules and attributes of an account.
AJAXTree This class implements an AJAX based tree.
alias The account type for aliases.
aliasEntry Manages the alias entry for the object class alias.
asteriskAccount Manages the Asterisk extension of user accounts.
asteriskExt The account type for Asterisk extensions.
asteriskExtension Manages Asterisk extensions.
asteriskVoicemail Manages the Asterisk extension of user accounts.
Attribute Represents an attribute of a template.
AttributeFactory AttributeFactory Class
AttributeType Represents an LDAP AttributeType
AttributeType Represents an LDAP AttributeType
authorizedServiceObject Provides Authorized Service for accounts.
automount Manages automount objects.
automountType The account type for automount objects.
baseModule Parent class of all account modules.
baseType This is the parent class of all account types.
BinaryAttribute Represents an attribute whose values are binary
bind The account type for managing Bind DNS entries.
bindDLZ Manages Bind DLZ DNS entries.
block This class draws a block.
Config The config class contains all our configuration settings for a session.
courierMailAccount Courier mail extension for users.
courierMailAlias Enable the account for Courier Mail Service Aliases
Crypt_AES Pure-PHP implementation of AES.
Crypt_Base Base Class for all Crypt_* cipher classes
Crypt_Blowfish Pure-PHP implementation of Blowfish.
Crypt_DES Pure-PHP implementation of DES.
Crypt_Hash Pure-PHP implementations of keyed-hash message authentication codes (HMACs) and various cryptographic hashing functions.
Crypt_RC2 Pure-PHP implementation of RC2.
Crypt_RC4 Pure-PHP implementation of RC4.
Crypt_Rijndael Pure-PHP implementation of Rijndael.
Crypt_RSA Pure-PHP PKCS#1 compliant implementation of RSA.
Crypt_TripleDES Pure-PHP implementation of Triple DES.
Crypt_Twofish Pure-PHP implementation of Twofish.
customFields Manages custom LDAP attributes.
customFieldsCheckboxEntry Represents a checkbox.
customFieldsConstantEntry Represents a constant field.
customFieldsConstantEntryTest Checks the ppolicy expire job.
customFieldsEntry Represents a field definition.
customFieldsFileUploadEntry Represents a file upload field.
customFieldsGroup Groups object classes and attributes for a specific account type.
customFieldsLdapSearchSelectListEntry Selection list with values of entries from LDAP search.
customFieldsPasswordEntry Represents a password field.
customFieldsRadioListEntry Represents a radio button list.
customFieldsSelectListEntry Represents a radio button list.
customFieldsTextAreaEntry Represents a text area field.
customFieldsTextEntry Represents a simple text field.
customScripts Runs custom scripts when account are managed.
Datastore The list of database sources
DateAttribute Represents an attribute whose values are dates
ddns Manages DDNS entries.
device Manages the device object class for host accounts.
dhcp The account type for DHCP
dhcp_settings Manages DHCP entries.
DnAttribute Represents an attribute whose values are DNs
DS This abstract class provides the basic variables and methods.
eduPerson Manages the eduPerson extension for user accounts.
Export Export Class
ExportCSV Export entries to CSV
ExportDSML Export entries to DSML v.1
Exporter Exporter Class
ExportLDIF Export from LDAP using an LDIF format
ExportVCARD Export entries to VCARD v2.1
File_ANSI Pure-PHP ANSI Decoder
File_ASN1 Pure-PHP ASN.1 Parser
File_ASN1_Element ASN.1 Element
File_X509 Pure-PHP X.509 Parser
fixed_ip Manages DHCP host entries.
FPDF
freeRadius Manages FreeRadius accounts.
FreeRadiusAccountExpirationCleanupJob Job to delete or move users on account expiration.
generalInformation Shows general information like the creation time of an account.
GidAttribute Represents a 'gidNumber' attribute
gon The account type for group of names.
group The account type for group accounts (e.g. Unix and Samba).
groupOfMembers Manages group members for the object class groupOfMembers.
groupOfNames Manages group members for the object class groupOfNames.
groupOfNamesUser Manages memberships for the object class groupOf(Unique)Names.
groupOfUniqueNames Manages group members for the object class groupOfUniqueNames.
heimdalKerberos Manages Heimdal Kerberos accounts.
Horde_Cipher_blowfish
host The account type for host accounts (e.g. Samba).
hostObject Manages the hosts to which a user may login.
htmlAccordion Creates a list of content elements in accordion style.
htmlAccountPageButton Prints a button for the account pages.
htmlButton Simple button.
htmlContentLink Generates a link arround a htmlElement.
htmlDiv Creates a simple DIV element.
htmlElement Represents a HTML element.
htmlEqualHeight Sets all given elements to the same height.
htmlEqualWidth Sets all given elements to the same width.
htmlFieldset Generates a fieldset.
htmlGroup Groups multiple htmlElements.
htmlHelpLink Renders a help link.
htmlHiddenInput Generates a hidden input field.
htmlHorizontalLine Prints a horizontal line.
htmlImage Prints the HTML code for an image.
htmlInputCheckbox Prints the HTML code for a checkbox.
htmlInputField A standard input field.
htmlInputFileUpload Prints the HTML code for a file upload field.
htmlInputTextarea Prints the HTML code for a textarea.
htmlJavaScript Creates a JavaScript element.
htmlLink Generates a link.
htmlOutputText Prints the text and escapes contained HTML code by default.
htmlRadio Represents a radio selection.
htmlReCAPTCHA Creates a Google reCAPTCHA element.
htmlResponsiveCell Responsive cell inside htmlResponsiveRow with 12 column layout.
htmlResponsiveInputField A responsive input field that combines label, input field and help.
htmlResponsiveRow Responsive row with 12 column layout.
htmlScript Creates a Script element to integrate external JavaScript files.
htmlSelect Represents a select box.
htmlSortableList Creates a list of elements that can be sorted by the user via drag'n'drop.
htmlSpacer Adds an empty space with given width and height.
htmlStatusMessage Prints a status message (e.g. error message).
htmlSubTitle Generates a subtitle line. This is used to group multiple fields.
htmlTable Structures elements using a table.
htmlTableExtendedInputCheckbox Checkbox with descriptive label and help link.
htmlTableExtendedInputField An extended input field that combines label, input field and help.
htmlTableExtendedInputFileUpload File upload with descriptive label and help link.
htmlTableExtendedInputTextarea Text area with label and help link.
htmlTableExtendedRadio Radio list with descriptive label and help link.
htmlTableExtendedSelect Select with label and help link.
htmlTableRow A row inside a htmlTable.
htmlTitle Generates a title line. This is used for page titles.
HTMLTree This class implements a straight HTML tree - no AJAX rendering is used.
ieee802device Provides MAC addresses for hosts.
imapAccess Manages mailboxes on an IMAP server.
Import Import Class
Importer Importer Class
ImportLDIF Import entries from LDIF
inetLocalMailRecipient Provides mail routing for users.
inetOrgPerson This module manages LDAP attributes of the object class inetOrgPerson (e.g. name and address).
ipHost Provides IP addresses for hosts.
JpegAttribute Represents an attribute whose values are jpeg pictures
kolabGroup Manages Kolab group accounts.
kolabSharedFolder Manages Kolab shared folders.
kolabSharedFolderType The account type for Kolab shared folders.
kolabSharedFolderTypeList Generates the list view.
kolabUser Manages Kolab user accounts.
kopanoAddressList Manages Kopano address list entries.
kopanoAddressListType The account type for Kopano address lists.
kopanoContact Manages Kopano contacts.
kopanoDynamicGroup Manages Kopano dynamic group entries.
kopanoDynamicGroupType The account type for Kopano dynamic groups.
kopanoGroup Manages Kopano group entries.
kopanoServer Manages Kopano server entries.
kopanoUser Manages Kopano users.
lamAjax Manages all AJAX requests.
lamAliasList Generates the list view.
lamAsteriskExtList Generates the list view.
lamAutomountList Generates the list view.
lamBindList Generates the list view.
lamBooleanListOption Boolean option for list configuration.
LAMCfgMain This class manages config.cfg.
LAMConfig This class manages conf files.
LAMConfigTest LAMConfig test case.
lamDHCPList Generates the list view.
LAMException
lamGonList Generates the list view.
lamGroupList Generates the list view.
lamHostList Generates the list view.
lamKopanoAddressListTypeList Generates the list view.
lamKopanoDynamicGroupTypeList Generates the list view.
LAMLanguage Represents a supported language.
lamList Generates the list view.
lamListOption Represents a list configuration option.
lamListTool Represents a tool which can be included in the account lists.
lamMailAliasList Generates the list view.
lamNetgroupList Generates the list view.
lamNisObjectList Generates the list view.
lamNsviewList Generates the list view.
lamOracleContextList Generates the list view.
lamPDF Creates a LAM information page in PDF format.
lamPpolicyList Generates the list view.
lamPykotaBillingCodeTypeList Generates the list view.
lamPykotaPrinterTypeList Generates the list view.
lamSelectListOption Boolean option for list configuration.
lamSmbDomainList Generates the list view.
LAMSubTool Represents a subtool.
lamSudoList Generates the list view.
lamUserList Generates the list view.
lamZarafaAddressListTypeList Generates the list view.
lamZarafaDynamicGroupTypeList Generates the list view.
Ldap Ldap manages connection to LDAP and includes several helper functions.
ldap_pla This abstract class provides variables and methods for LDAP datastores for use by PLA.
ldapPublicKey Manages SSH public keys.
ListAttributeTest Checks ListAttribute.
locking389ds Shows the locking state for 389ds servers.
Locking389DSPasswordNotifyJob Job to notify users about password expiration.
mailAlias The account type for mail aliases.
MassRender TemplateRender class
MatchingRule Represents an LDAP MatchingRule
MatchingRule Represents an LDAP MatchingRule
MatchingRuleUse Represents an LDAP schema matchingRuleUse entry
MatchingRuleUse Represents an LDAP schema matchingRuleUse entry
Math_BigInteger Pure-PHP arbitrary precision integer arithmetic library. Supports base-2, base-10, base-16, and base-256 numbers.
mitKerberos Manages MIT Kerberos accounts.
mitKerberosStructural Manages MIT Kerberos accounts.
moduleCache Caches module objects.
MultiLineAttribute Represents a attribute whose values are multiline text
myldap This abstract class provides the basic variables and methods for LDAP datastores
namedObject Manages the namedObject object class.
Net_SCP Pure-PHP implementations of SCP.
Net_SFTP Pure-PHP implementations of SFTP.
Net_SFTP_Stream SFTP Stream Wrapper
Net_SSH1 Pure-PHP implementation of SSHv1.
Net_SSH2 Pure-PHP implementation of SSHv2.
netgroup The account type for NIS netgroups.
nisMailAlias Provides NIS mail alias management.
nisMailAliasUser Provides NIS mail alias management.
nisnetgroup Manages entries based on the object class nisNetgroup.
nisNetGroupHost Manages memberships in NIS net groups.
nisNetGroupUser Manages memberships in NIS net groups.
nisObject Manages NIS objects.
nisObjectType The account type for NIS objects.
nsview Manages the object class "nsview" for LDAP views.
nsviewType The account type for LDAP views based on nsview object class.
ObjectClass Represents an LDAP objectClass
ObjectClass Represents an LDAP objectClass
ObjectClass_ObjectClassAttribute A simple class for representing AttributeTypes used only by the ObjectClass class.
ObjectClassAttribute A simple class for representing AttributeTypes used only by the ObjectClass class.
ObjectClassAttribute Represents an 'objectClass' attribute
oracleContextType The account type for Oracle database entries.
oracleService Manages Oracle database entries.
organizationalRole Manages group members for the object class organizationalRole.
organizationalRoleUser Manages memberships for the object class organizationalRole.
page This class controls the final output to the browser.
PageRender PageRender class
PasswordAttribute Represents an attribute whose values are passwords
passwordSelfReset Manages password self reset questions and answers.
posixAccount Manages the object class "posixAccount" for users and hosts.
posixGroup Manages the object class "posixGroup" for groups.
ppolicy Manages ppolicy password policies.
PPolicyPasswordNotifyJob Job to notify users about password expiration.
ppolicyType The account type for ppoliy password policies.
ppolicyUser Assigns password policies to users.
PPolicyUserPasswordNotifyJobTest Checks the ppolicy expire job.
puppetClient Manages Puppet configuration options.
pykotaBillingCode Manages PyKota billing codes.
pykotaBillingCodeType The account type for PyKota billing codes.
pykotaGroup Manages PyKota group accounts.
pykotaGroupStructural Manages PyKota group accounts.
pykotaPrinter Manages PyKota printers.
pykotaPrinterType The account type for PyKota printers.
pykotaUser Manages PyKota user accounts.
pykotaUserStructural Manages PyKota user accounts.
QmailAccountExpirationCleanupJob Job to delete or move users on account expiration.
qmailGroup Manages qmail groups.
qmailUser Manages qmail users.
Queries Query Class
Query Query Class
QueryRender QueryRender class
quota Manages quotas for users and groups.
RandomPasswordAttribute Represents an attribute whose values are random passwords
range Manages DHCP ranges for DHCP server.
ReadStructureTest Reads a sample PDF structure.
rfc2307bisAutomount Manages automount objects (RFC2307bis schema).
rfc2307bisPosixGroup Manages group members for the object class rfc2307bisPosixGroup.
samba3domain Represents a Samba 3 domain entry
sambaDomain Manages Samba 3 domain entries.
sambaGroupMapping Manages the object class "sambaGroupMapping" for groups.
sambaMungedDial Manages terminal server settings for Samba 3.
SambaPasswordAttribute Represents an attribute whose values are SAMBA passwords
sambaSamAccount Manages the object class "sambaSamAccount" for users and hosts.
SambaSamAccountTest Checks the shadow expire job.
SchemaItem Generic parent class for all schema items. A schema item is an ObjectClass, an AttributeBype, a MatchingRule, or a Syntax.
SchemaItem Generic parent class for all schema items. A schema item is an ObjectClass, an AttributeBype, a MatchingRule, or a Syntax.
SecurityTest Checks password checking functions.
SelectionAttribute Represents an attribute whose values are in a predefined list
selfRegistration Allows users to register accounts via LAM Pro self service.
selfServiceProfile Includes all settings of a self service profile.
shadowAccount Manages the object class "shadowAccount" for users.
ShadowAccountExpirationCleanupJob Job to delete or move users on account expiration.
ShadowAccountPasswordNotifyJob Job to notify users about password expiration.
ShadowAccountPasswordNotifyJobTest Checks the shadow expire job.
ShadowAttribute Represents a shadow date attribute
smbDomain The account type for Samba domains.
smbHash Calculates NT and LM hashes.
smbHash Calculates NT and LM hashes.
sudo The account type for sudo roles.
sudoRole Manages sudo roles.
SudoRoleTest Checks sudo role functions.
Syntax Represents an LDAP Syntax
Syntax Represents an LDAP Syntax
System_SSH_Agent Pure-PHP ssh-agent client identity factory
System_SSH_Agent_Identity Pure-PHP ssh-agent client identity object
systemQuotas Manages user quotas with the object class systemQuotas.
Template Template Class
TemplateRender TemplateRender class
Templates Templates Class
Tree Abstract class which represents the LDAP tree view ; the draw() method must be implemented by subclasses
TreeItem Represents an item in the tree.
UFPDF Main UFPDF class for creating Unicode PDF documents
uidObject Manages entries based on the object class uidObject.
user The account type for user accounts (e.g. Unix, Samba and Kolab).
Visitor Abstract Visitor class
WindowsAccountExpirationCleanupJob Job to delete or move users on account expiration.
windowsGroup Manages Windows AD (e.g. Samba 4) groups.
windowsHost Manages Windows AD (e.g. Samba 4) hosts.
WindowsPasswordNotifyJob Job to notify users about password expiration.
windowsPosixGroup Manages Unix groups in Windows LDAP schema.
windowsUser Manages Windows AD (e.g. Samba 4) users.
xml2array XML Parser
xmlTemplate XML Template Class
xmlTemplates XML Templates Class
zarafaAddressList Manages Zarafa address list entries.
zarafaAddressListType The account type for Zarafa address lists.
zarafaContact Manages Zarafa contacts.
zarafaDynamicGroup Manages Zarafa dynamic group entries.
zarafaDynamicGroupType The account type for Zarafa dynamic groups.
zarafaGroup Manages Zarafa group entries.
zarafaServer Manages Zarafa server entries.
zarafaUser Manages Zarafa users.

Constants

$value

$value

$value

$value

ADD

ADD

APPCONFIG

APPCONFIG

APPCONFIG

APPCONFIG

We will perform some sanity checking here, since this file is normally loaded first when users first access the application.

CONFDIR

CONFDIR

CRYPT_AES_MODE_CBC

CRYPT_AES_MODE_CBC

Encrypt / decrypt using the Code Book Chaining mode.

CRYPT_AES_MODE_CFB

CRYPT_AES_MODE_CFB

Encrypt / decrypt using the Cipher Feedback mode.

CRYPT_AES_MODE_CTR

CRYPT_AES_MODE_CTR

Encrypt / decrypt using the Counter mode.

Set to -1 since that's what Crypt/Random.php uses to index the CTR mode.

CRYPT_AES_MODE_ECB

CRYPT_AES_MODE_ECB

Encrypt / decrypt using the Electronic Code Book mode.

CRYPT_AES_MODE_OFB

CRYPT_AES_MODE_OFB

Encrypt / decrypt using the Cipher Feedback mode.

CRYPT_BASE_WHIRLPOOL_AVAILABLE

CRYPT_BASE_WHIRLPOOL_AVAILABLE

CRYPT_BLOWFISH_MODE_CBC

CRYPT_BLOWFISH_MODE_CBC

Encrypt / decrypt using the Code Book Chaining mode.

CRYPT_BLOWFISH_MODE_CFB

CRYPT_BLOWFISH_MODE_CFB

Encrypt / decrypt using the Cipher Feedback mode.

CRYPT_BLOWFISH_MODE_CTR

CRYPT_BLOWFISH_MODE_CTR

Encrypt / decrypt using the Counter mode.

Set to -1 since that's what Crypt/Random.php uses to index the CTR mode.

CRYPT_BLOWFISH_MODE_ECB

CRYPT_BLOWFISH_MODE_ECB

Encrypt / decrypt using the Electronic Code Book mode.

CRYPT_BLOWFISH_MODE_OFB

CRYPT_BLOWFISH_MODE_OFB

Encrypt / decrypt using the Cipher Feedback mode.

CRYPT_DES_DECRYPT

CRYPT_DES_DECRYPT

Contains $keys[CRYPT_DES_DECRYPT]

CRYPT_DES_ENCRYPT

CRYPT_DES_ENCRYPT

Contains $keys[CRYPT_DES_ENCRYPT]

CRYPT_DES_MODE_3CBC

CRYPT_DES_MODE_3CBC

BC version of the above.

CRYPT_DES_MODE_CBC

CRYPT_DES_MODE_CBC

Encrypt / decrypt using the Code Book Chaining mode.

CRYPT_DES_MODE_CBC3

CRYPT_DES_MODE_CBC3

BC version of the above.

CRYPT_DES_MODE_CFB

CRYPT_DES_MODE_CFB

Encrypt / decrypt using the Cipher Feedback mode.

CRYPT_DES_MODE_CTR

CRYPT_DES_MODE_CTR

Encrypt / decrypt using the Counter mode.

Set to -1 since that's what Crypt/Random.php uses to index the CTR mode.

CRYPT_DES_MODE_ECB

CRYPT_DES_MODE_ECB

Encrypt / decrypt using the Electronic Code Book mode.

CRYPT_DES_MODE_OFB

CRYPT_DES_MODE_OFB

Encrypt / decrypt using the Cipher Feedback mode.

CRYPT_ENGINE_INTERNAL

CRYPT_ENGINE_INTERNAL

Base value for the internal implementation $engine switch

CRYPT_ENGINE_MCRYPT

CRYPT_ENGINE_MCRYPT

Base value for the mcrypt implementation $engine switch

CRYPT_ENGINE_OPENSSL

CRYPT_ENGINE_OPENSSL

Base value for the OpenSSL implementation $engine switch

CRYPT_HASH_MODE

CRYPT_HASH_MODE

CRYPT_HASH_MODE_HASH

CRYPT_HASH_MODE_HASH

Toggles the hash() implementation, which works on PHP 5.1.2+.

CRYPT_HASH_MODE_INTERNAL

CRYPT_HASH_MODE_INTERNAL

Toggles the internal implementation

CRYPT_HASH_MODE_MHASH

CRYPT_HASH_MODE_MHASH

Toggles the mhash() implementation, which has been deprecated on PHP 5.3.0+.

CRYPT_MODE_3CBC

CRYPT_MODE_3CBC

Encrypt / decrypt using inner chaining

Inner chaining is used by SSH-1 and is generally considered to be less secure then outer chaining (CRYPT_DES_MODE_CBC3).

CRYPT_MODE_CBC

CRYPT_MODE_CBC

Encrypt / decrypt using the Code Book Chaining mode.

CRYPT_MODE_CBC3

CRYPT_MODE_CBC3

Encrypt / decrypt using outer chaining

Outer chaining is used by SSH-2 and when the mode is set to CRYPT_DES_MODE_CBC.

CRYPT_MODE_CFB

CRYPT_MODE_CFB

Encrypt / decrypt using the Cipher Feedback mode.

CRYPT_MODE_CTR

CRYPT_MODE_CTR

Encrypt / decrypt using the Counter mode.

Set to -1 since that's what Crypt/Random.php uses to index the CTR mode.

CRYPT_MODE_ECB

CRYPT_MODE_ECB

Encrypt / decrypt using the Electronic Code Book mode.

CRYPT_MODE_OFB

CRYPT_MODE_OFB

Encrypt / decrypt using the Output Feedback mode.

CRYPT_MODE_STREAM

CRYPT_MODE_STREAM

Encrypt / decrypt using streaming mode.

CRYPT_RANDOM_IS_WINDOWS

CRYPT_RANDOM_IS_WINDOWS

"Is Windows" test

CRYPT_RC2_MODE_CBC

CRYPT_RC2_MODE_CBC

Encrypt / decrypt using the Code Book Chaining mode.

CRYPT_RC2_MODE_CFB

CRYPT_RC2_MODE_CFB

Encrypt / decrypt using the Cipher Feedback mode.

CRYPT_RC2_MODE_CTR

CRYPT_RC2_MODE_CTR

Encrypt / decrypt using the Counter mode.

Set to -1 since that's what Crypt/Random.php uses to index the CTR mode.

CRYPT_RC2_MODE_ECB

CRYPT_RC2_MODE_ECB

Encrypt / decrypt using the Electronic Code Book mode.

CRYPT_RC2_MODE_OFB

CRYPT_RC2_MODE_OFB

Encrypt / decrypt using the Cipher Feedback mode.

CRYPT_RC4_DECRYPT

CRYPT_RC4_DECRYPT

CRYPT_RC4_ENCRYPT

CRYPT_RC4_ENCRYPT

CRYPT_RIJNDAEL_MODE_CBC

CRYPT_RIJNDAEL_MODE_CBC

Encrypt / decrypt using the Code Book Chaining mode.

CRYPT_RIJNDAEL_MODE_CFB

CRYPT_RIJNDAEL_MODE_CFB

Encrypt / decrypt using the Cipher Feedback mode.

CRYPT_RIJNDAEL_MODE_CTR

CRYPT_RIJNDAEL_MODE_CTR

Encrypt / decrypt using the Counter mode.

Set to -1 since that's what Crypt/Random.php uses to index the CTR mode.

CRYPT_RIJNDAEL_MODE_ECB

CRYPT_RIJNDAEL_MODE_ECB

Encrypt / decrypt using the Electronic Code Book mode.

CRYPT_RIJNDAEL_MODE_OFB

CRYPT_RIJNDAEL_MODE_OFB

Encrypt / decrypt using the Cipher Feedback mode.

CRYPT_RSA_ASN1_BITSTRING

CRYPT_RSA_ASN1_BITSTRING

ASN1 Bit String

CRYPT_RSA_ASN1_INTEGER

CRYPT_RSA_ASN1_INTEGER

ASN1 Integer

CRYPT_RSA_ASN1_OBJECT

CRYPT_RSA_ASN1_OBJECT

ASN1 Object Identifier

CRYPT_RSA_ASN1_OCTETSTRING

CRYPT_RSA_ASN1_OCTETSTRING

ASN1 Octet String

CRYPT_RSA_ASN1_SEQUENCE

CRYPT_RSA_ASN1_SEQUENCE

ASN1 Sequence (with the constucted bit set)

CRYPT_RSA_ENCRYPTION_NONE

CRYPT_RSA_ENCRYPTION_NONE

Do not use any padding

Although this method is not recommended it can none-the-less sometimes be useful if you're trying to decrypt some legacy stuff, if you're trying to diagnose why an encrypted message isn't decrypting, etc.

CRYPT_RSA_ENCRYPTION_OAEP

CRYPT_RSA_ENCRYPTION_OAEP

Use {@link http://en.wikipedia.org/wiki/Optimal_Asymmetric_Encryption_Padding Optimal Asymmetric Encryption Padding} (OAEP) for encryption / decryption.

Uses sha1 by default.

CRYPT_RSA_ENCRYPTION_PKCS1

CRYPT_RSA_ENCRYPTION_PKCS1

Use PKCS#1 padding.

Although CRYPT_RSA_ENCRYPTION_OAEP offers more security, including PKCS#1 padding is necessary for purposes of backwards compatibility with protocols (like SSH-1) written before OAEP's introduction.

CRYPT_RSA_EXPONENT

CRYPT_RSA_EXPONENT

CRYPT_RSA_MODE

CRYPT_RSA_MODE

CRYPT_RSA_MODE_INTERNAL

CRYPT_RSA_MODE_INTERNAL

To use the pure-PHP implementation

CRYPT_RSA_MODE_OPENSSL

CRYPT_RSA_MODE_OPENSSL

To use the OpenSSL library

(if enabled; otherwise, the internal implementation will be used)

CRYPT_RSA_OPENSSL_CONFIG

CRYPT_RSA_OPENSSL_CONFIG

Default openSSL configuration file.

CRYPT_RSA_PRIVATE_FORMAT_PKCS1

CRYPT_RSA_PRIVATE_FORMAT_PKCS1

PKCS#1 formatted private key

Used by OpenSSH

CRYPT_RSA_PRIVATE_FORMAT_PKCS8

CRYPT_RSA_PRIVATE_FORMAT_PKCS8

PKCS#8 formatted private key

CRYPT_RSA_PRIVATE_FORMAT_PUTTY

CRYPT_RSA_PRIVATE_FORMAT_PUTTY

PuTTY formatted private key

CRYPT_RSA_PRIVATE_FORMAT_XML

CRYPT_RSA_PRIVATE_FORMAT_XML

XML formatted private key

CRYPT_RSA_PUBLIC_FORMAT_OPENSSH

CRYPT_RSA_PUBLIC_FORMAT_OPENSSH

OpenSSH formatted public key

Place in $HOME/.ssh/authorized_keys

CRYPT_RSA_PUBLIC_FORMAT_PKCS1

CRYPT_RSA_PUBLIC_FORMAT_PKCS1

PKCS#1 formatted public key (raw)

Used by File/X509.php

Has the following header:

-----BEGIN RSA PUBLIC KEY-----

Analogous to ssh-keygen's pem format (as specified by -m)

CRYPT_RSA_PUBLIC_FORMAT_PKCS1_RAW

CRYPT_RSA_PUBLIC_FORMAT_PKCS1_RAW

CRYPT_RSA_PUBLIC_FORMAT_PKCS8

CRYPT_RSA_PUBLIC_FORMAT_PKCS8

PKCS#1 formatted public key (encapsulated)

Used by PHP's openssl_public_encrypt() and openssl's rsautl (when -pubin is set)

Has the following header:

-----BEGIN PUBLIC KEY-----

Analogous to ssh-keygen's pkcs8 format (as specified by -m). Although PKCS8 is specific to private keys it's basically creating a DER-encoded wrapper for keys. This just extends that same concept to public keys (much like ssh-keygen)

CRYPT_RSA_PUBLIC_FORMAT_RAW

CRYPT_RSA_PUBLIC_FORMAT_RAW

Raw public key

An array containing two Math_BigInteger objects.

The exponent can be indexed with any of the following:

0, e, exponent, publicExponent

The modulus can be indexed with any of the following:

1, n, modulo, modulus

CRYPT_RSA_PUBLIC_FORMAT_XML

CRYPT_RSA_PUBLIC_FORMAT_XML

XML formatted public key

CRYPT_RSA_SIGNATURE_PKCS1

CRYPT_RSA_SIGNATURE_PKCS1

Use the PKCS#1 scheme by default.

Although CRYPT_RSA_SIGNATURE_PSS offers more security, including PKCS#1 signing is necessary for purposes of backwards compatibility with protocols (like SSH-2) written before PSS's introduction.

CRYPT_RSA_SIGNATURE_PSS

CRYPT_RSA_SIGNATURE_PSS

Use the Probabilistic Signature Scheme for signing

Uses sha1 by default.

CRYPT_RSA_SMALLEST_PRIME

CRYPT_RSA_SMALLEST_PRIME

CRYPT_TWOFISH_MODE_CBC

CRYPT_TWOFISH_MODE_CBC

Encrypt / decrypt using the Code Book Chaining mode.

CRYPT_TWOFISH_MODE_CFB

CRYPT_TWOFISH_MODE_CFB

Encrypt / decrypt using the Cipher Feedback mode.

CRYPT_TWOFISH_MODE_CTR

CRYPT_TWOFISH_MODE_CTR

Encrypt / decrypt using the Counter mode.

Set to -1 since that's what Crypt/Random.php uses to index the CTR mode.

CRYPT_TWOFISH_MODE_ECB

CRYPT_TWOFISH_MODE_ECB

Encrypt / decrypt using the Electronic Code Book mode.

CRYPT_TWOFISH_MODE_OFB

CRYPT_TWOFISH_MODE_OFB

Encrypt / decrypt using the Cipher Feedback mode.

CSSDIR

CSSDIR

CSSDIR

CSSDIR

DEBUG_ENABLED

DEBUG_ENABLED

DEBUGTMP

DEBUGTMP

DEBUGTMPSUB

DEBUGTMPSUB

DEL

DEL

DOCDIR

DOCDIR

E_STRICT

E_STRICT

FILE_ASN1_CLASS_APPLICATION

FILE_ASN1_CLASS_APPLICATION

FILE_ASN1_CLASS_CONTEXT_SPECIFIC

FILE_ASN1_CLASS_CONTEXT_SPECIFIC

FILE_ASN1_CLASS_PRIVATE

FILE_ASN1_CLASS_PRIVATE

FILE_ASN1_CLASS_UNIVERSAL

FILE_ASN1_CLASS_UNIVERSAL

FILE_ASN1_TYPE_ANY

FILE_ASN1_TYPE_ANY

FILE_ASN1_TYPE_BIT_STRING

FILE_ASN1_TYPE_BIT_STRING

FILE_ASN1_TYPE_BMP_STRING

FILE_ASN1_TYPE_BMP_STRING

FILE_ASN1_TYPE_BOOLEAN

FILE_ASN1_TYPE_BOOLEAN

FILE_ASN1_TYPE_CHOICE

FILE_ASN1_TYPE_CHOICE

FILE_ASN1_TYPE_ENUMERATED

FILE_ASN1_TYPE_ENUMERATED

FILE_ASN1_TYPE_GENERAL_STRING

FILE_ASN1_TYPE_GENERAL_STRING

FILE_ASN1_TYPE_GENERALIZED_TIME

FILE_ASN1_TYPE_GENERALIZED_TIME

FILE_ASN1_TYPE_GRAPHIC_STRING

FILE_ASN1_TYPE_GRAPHIC_STRING

FILE_ASN1_TYPE_IA5_STRING

FILE_ASN1_TYPE_IA5_STRING

FILE_ASN1_TYPE_INTEGER

FILE_ASN1_TYPE_INTEGER

FILE_ASN1_TYPE_NULL

FILE_ASN1_TYPE_NULL

FILE_ASN1_TYPE_NUMERIC_STRING

FILE_ASN1_TYPE_NUMERIC_STRING

FILE_ASN1_TYPE_OBJECT_IDENTIFIER

FILE_ASN1_TYPE_OBJECT_IDENTIFIER

FILE_ASN1_TYPE_OCTET_STRING

FILE_ASN1_TYPE_OCTET_STRING

FILE_ASN1_TYPE_PRINTABLE_STRING

FILE_ASN1_TYPE_PRINTABLE_STRING

FILE_ASN1_TYPE_REAL

FILE_ASN1_TYPE_REAL

FILE_ASN1_TYPE_SEQUENCE

FILE_ASN1_TYPE_SEQUENCE

FILE_ASN1_TYPE_SET

FILE_ASN1_TYPE_SET

FILE_ASN1_TYPE_TELETEX_STRING

FILE_ASN1_TYPE_TELETEX_STRING

FILE_ASN1_TYPE_UNIVERSAL_STRING

FILE_ASN1_TYPE_UNIVERSAL_STRING

FILE_ASN1_TYPE_UTC_TIME

FILE_ASN1_TYPE_UTC_TIME

FILE_ASN1_TYPE_UTF8_STRING

FILE_ASN1_TYPE_UTF8_STRING

FILE_ASN1_TYPE_VIDEOTEX_STRING

FILE_ASN1_TYPE_VIDEOTEX_STRING

FILE_ASN1_TYPE_VISIBLE_STRING

FILE_ASN1_TYPE_VISIBLE_STRING

FILE_X509_ATTR_ALL

FILE_X509_ATTR_ALL

Attribute value disposition.

If disposition is >= 0, this is the index of the target value.

FILE_X509_ATTR_APPEND

FILE_X509_ATTR_APPEND

FILE_X509_ATTR_REPLACE

FILE_X509_ATTR_REPLACE

FILE_X509_DN_ARRAY

FILE_X509_DN_ARRAY

Return internal array representation

FILE_X509_DN_ASN1

FILE_X509_DN_ASN1

Return ASN.1 name string

FILE_X509_DN_CANON

FILE_X509_DN_CANON

Return canonical ASN.1 RDNs string

FILE_X509_DN_HASH

FILE_X509_DN_HASH

Return name hash for file indexing

FILE_X509_DN_OPENSSL

FILE_X509_DN_OPENSSL

Return OpenSSL compatible array

FILE_X509_DN_STRING

FILE_X509_DN_STRING

Return string

FILE_X509_FORMAT_AUTO_DETECT

FILE_X509_FORMAT_AUTO_DETECT

Auto-detect the format

Used only by the load*() functions

FILE_X509_FORMAT_DER

FILE_X509_FORMAT_DER

Save as DER

FILE_X509_FORMAT_PEM

FILE_X509_FORMAT_PEM

Save as PEM

ie. a base64-encoded PEM with a header and a footer

FILE_X509_FORMAT_SPKAC

FILE_X509_FORMAT_SPKAC

Save as a SPKAC

Only works on CSRs. Not currently supported.

FILE_X509_VALIDATE_SIGNATURE_BY_CA

FILE_X509_VALIDATE_SIGNATURE_BY_CA

Flag to only accept signatures signed by certificate authorities

Not really used anymore but retained all the same to suppress E_NOTICEs from old installs

FPDF_FONTPATH

FPDF_FONTPATH

FPDF_VERSION

FPDF_VERSION

HOOKSDIR

HOOKSDIR

HTDOCDIR

HTDOCDIR

IMGDIR

IMGDIR

IMGDIR

IMGDIR

JSDIR

JSDIR

LAMPDF_FONT_SIZE

LAMPDF_FONT_SIZE

font size

LAMPDF_FONT_SIZE_BIG

LAMPDF_FONT_SIZE_BIG

font size for bigger text

LAMPDF_LABELWIDTH

LAMPDF_LABELWIDTH

width of a label

LAMPDF_LINEHEIGHT

LAMPDF_LINEHEIGHT

line height

LAMPDF_LINEWIDTH

LAMPDF_LINEWIDTH

line width

LANGDIR

LANGDIR

LIBDIR

LIBDIR

LIBDIR

LIBDIR

LIBDIR

LIBDIR

MATH_BIGINTEGER_BARRETT

MATH_BIGINTEGER_BARRETT

MATH_BIGINTEGER_BASE

MATH_BIGINTEGER_BASE

MATH_BIGINTEGER_BASE_FULL

MATH_BIGINTEGER_BASE_FULL

MATH_BIGINTEGER_CLASSIC

MATH_BIGINTEGER_CLASSIC

MATH_BIGINTEGER_DATA

MATH_BIGINTEGER_DATA

$cache[MATH_BIGINTEGER_DATA] contains the cached data.

MATH_BIGINTEGER_KARATSUBA_CUTOFF

MATH_BIGINTEGER_KARATSUBA_CUTOFF

Karatsuba Cutoff

At what point do we switch between Karatsuba multiplication and schoolbook long multiplication?

MATH_BIGINTEGER_MAX10

MATH_BIGINTEGER_MAX10

MATH_BIGINTEGER_MAX10_LEN

MATH_BIGINTEGER_MAX10_LEN

MATH_BIGINTEGER_MAX_DIGIT

MATH_BIGINTEGER_MAX_DIGIT

MATH_BIGINTEGER_MAX_DIGIT2

MATH_BIGINTEGER_MAX_DIGIT2

MATH_BIGINTEGER_MODE

MATH_BIGINTEGER_MODE

MATH_BIGINTEGER_MODE_BCMATH

MATH_BIGINTEGER_MODE_BCMATH

To use the BCMath library

(if enabled; otherwise, the internal implementation will be used)

MATH_BIGINTEGER_MODE_GMP

MATH_BIGINTEGER_MODE_GMP

To use the GMP library

(if present; otherwise, either the BCMath or the internal implementation will be used)

MATH_BIGINTEGER_MODE_INTERNAL

MATH_BIGINTEGER_MODE_INTERNAL

To use the pure-PHP implementation

MATH_BIGINTEGER_MONTGOMERY

MATH_BIGINTEGER_MONTGOMERY

MATH_BIGINTEGER_MSB

MATH_BIGINTEGER_MSB

MATH_BIGINTEGER_NONE

MATH_BIGINTEGER_NONE

MATH_BIGINTEGER_OPENSSL_DISABLE

MATH_BIGINTEGER_OPENSSL_DISABLE

MATH_BIGINTEGER_OPENSSL_DISABLE

MATH_BIGINTEGER_OPENSSL_DISABLE

MATH_BIGINTEGER_OPENSSL_ENABLED

MATH_BIGINTEGER_OPENSSL_ENABLED

MATH_BIGINTEGER_POWEROF2

MATH_BIGINTEGER_POWEROF2

MATH_BIGINTEGER_SIGN

MATH_BIGINTEGER_SIGN

$result[MATH_BIGINTEGER_SIGN] contains the sign.

MATH_BIGINTEGER_VALUE

MATH_BIGINTEGER_VALUE

$result[MATH_BIGINTEGER_VALUE] contains the value.

MATH_BIGINTEGER_VARIABLE

MATH_BIGINTEGER_VARIABLE

Cache constants

$cache[MATH_BIGINTEGER_VARIABLE] tells us whether or not the cached data is still valid.

MHASH_MD5

MHASH_MD5

MHASH_RIPEMD160

MHASH_RIPEMD160

MHASH_SHA1

MHASH_SHA1

MOD

MOD

NET_SCP_LOCAL_FILE

NET_SCP_LOCAL_FILE

Reads data from a local file.

NET_SCP_SSH1

NET_SCP_SSH1

SSH1 is being used.

NET_SCP_SSH2

NET_SCP_SSH2

SSH2 is being used.

NET_SCP_STRING

NET_SCP_STRING

Reads data from a string.

NET_SFTP_CALLBACK

NET_SFTP_CALLBACK

Reads data from callback: function callback($length) returns string to proceed, null for EOF

NET_SFTP_CHANNEL

NET_SFTP_CHANNEL

SFTP channel constant

Net_SSH2::exec() uses 0 and Net_SSH2::read() / Net_SSH2::write() use 1.

NET_SFTP_LOCAL_FILE

NET_SFTP_LOCAL_FILE

Reads data from a local file.

NET_SFTP_LOG_COMPLEX

NET_SFTP_LOG_COMPLEX

Returns the message content

NET_SFTP_LOG_REALTIME

NET_SFTP_LOG_REALTIME

Outputs the message content in real-time.

NET_SFTP_LOG_SIMPLE

NET_SFTP_LOG_SIMPLE

Returns the message numbers

NET_SFTP_QUEUE_SIZE

NET_SFTP_QUEUE_SIZE

NET_SFTP_RESUME

NET_SFTP_RESUME

Resumes an upload

NET_SFTP_RESUME_START

NET_SFTP_RESUME_START

Append a local file to an already existing remote file

NET_SFTP_STRING

NET_SFTP_STRING

NET_SSH1_AUTH_PASSWORD

NET_SSH1_AUTH_PASSWORD

password authentication

This is the only method that is supported by this library.

NET_SSH1_AUTH_RHOSTS

NET_SSH1_AUTH_RHOSTS

NET_SSH1_AUTH_RHOSTS_RSA

NET_SSH1_AUTH_RHOSTS_RSA

NET_SSH1_AUTH_RSA

NET_SSH1_AUTH_RSA

pure RSA authentication

NET_SSH1_CIPHER_3DES

NET_SSH1_CIPHER_3DES

Triple-DES in CBC mode

All implementations are required to support this

NET_SSH1_CIPHER_BLOWFISH

NET_SSH1_CIPHER_BLOWFISH

Blowfish

Not supported nor is it defined in the official SSH1 specs. OpenSSH, however, defines it (see cipher.h) and uses it (see cipher.c)

NET_SSH1_CIPHER_BROKEN_TSS

NET_SSH1_CIPHER_BROKEN_TSS

TRI's Simple Stream encryption CBC

Not supported nor is it defined in the official SSH1 specs. OpenSSH, however, does define it (see cipher.h), although it doesn't use it (see cipher.c)

NET_SSH1_CIPHER_DES

NET_SSH1_CIPHER_DES

DES in CBC mode

NET_SSH1_CIPHER_IDEA

NET_SSH1_CIPHER_IDEA

IDEA in CFB mode

Not supported.

NET_SSH1_CIPHER_NONE

NET_SSH1_CIPHER_NONE

No encryption

Not supported.

NET_SSH1_LOG_COMPLEX

NET_SSH1_LOG_COMPLEX

Returns the message content

NET_SSH1_LOG_REALTIME

NET_SSH1_LOG_REALTIME

Outputs the content real-time

NET_SSH1_LOG_REALTIME_FILE

NET_SSH1_LOG_REALTIME_FILE

Dumps the content real-time to a file

NET_SSH1_LOG_SIMPLE

NET_SSH1_LOG_SIMPLE

Returns the message numbers

NET_SSH1_MASK_CONNECTED

NET_SSH1_MASK_CONNECTED

NET_SSH1_MASK_CONSTRUCTOR

NET_SSH1_MASK_CONSTRUCTOR

NET_SSH1_MASK_LOGIN

NET_SSH1_MASK_LOGIN

NET_SSH1_MASK_SHELL

NET_SSH1_MASK_SHELL

NET_SSH1_READ_REGEX

NET_SSH1_READ_REGEX

Returns when a string matching the regular expression $expect is found

NET_SSH1_READ_SIMPLE

NET_SSH1_READ_SIMPLE

Returns when a string matching $expect exactly is found

NET_SSH1_RESPONSE_DATA

NET_SSH1_RESPONSE_DATA

The Response Data

NET_SSH1_RESPONSE_TYPE

NET_SSH1_RESPONSE_TYPE

The Response Type

NET_SSH1_TTY_OP_END

NET_SSH1_TTY_OP_END

NET_SSH2_CHANNEL_AGENT_FORWARD

NET_SSH2_CHANNEL_AGENT_FORWARD

NET_SSH2_CHANNEL_EXEC

NET_SSH2_CHANNEL_EXEC

NET_SSH2_CHANNEL_SHELL

NET_SSH2_CHANNEL_SHELL

NET_SSH2_CHANNEL_SUBSYSTEM

NET_SSH2_CHANNEL_SUBSYSTEM

NET_SSH2_LOG_COMPLEX

NET_SSH2_LOG_COMPLEX

Returns the message content

NET_SSH2_LOG_MAX_SIZE

NET_SSH2_LOG_MAX_SIZE

Make sure that the log never gets larger than this

NET_SSH2_LOG_REALTIME

NET_SSH2_LOG_REALTIME

Outputs the content real-time

NET_SSH2_LOG_REALTIME_FILE

NET_SSH2_LOG_REALTIME_FILE

Dumps the content real-time to a file

NET_SSH2_LOG_SIMPLE

NET_SSH2_LOG_SIMPLE

Returns the message numbers

NET_SSH2_MASK_CONNECTED

NET_SSH2_MASK_CONNECTED

NET_SSH2_MASK_CONSTRUCTOR

NET_SSH2_MASK_CONSTRUCTOR

NET_SSH2_MASK_LOGIN

NET_SSH2_MASK_LOGIN

NET_SSH2_MASK_LOGIN_REQ

NET_SSH2_MASK_LOGIN_REQ

NET_SSH2_MASK_SHELL

NET_SSH2_MASK_SHELL

NET_SSH2_MASK_WINDOW_ADJUST

NET_SSH2_MASK_WINDOW_ADJUST

NET_SSH2_READ_REGEX

NET_SSH2_READ_REGEX

Returns when a string matching the regular expression $expect is found

NET_SSH2_READ_SIMPLE

NET_SSH2_READ_SIMPLE

Returns when a string matching $expect exactly is found

PHP_INT_SIZE

PHP_INT_SIZE

QUERYDIR

QUERYDIR

REQUIRED_PHP_VERSION

REQUIRED_PHP_VERSION

The minimum version of PHP required to run phpLDAPadmin.

SAMBA_MUNGEDDIAL_FILEHEADER

SAMBA_MUNGEDDIAL_FILEHEADER

File header

SAMBA_MUNGEDDIAL_FILEHEADER_OLD

SAMBA_MUNGEDDIAL_FILEHEADER_OLD

File header for old format.

SCHEMA_SESSION_CACHE_ENABLED

SCHEMA_SESSION_CACHE_ENABLED

STAGE_ACTIONS_CALCULATED

STAGE_ACTIONS_CALCULATED

STAGE_FINISHED

STAGE_FINISHED

STAGE_READ_FINISHED

STAGE_READ_FINISHED

STAGE_START

STAGE_START

STAGE_WRITING

STAGE_WRITING

SYSTEM_SSH_AGENT_FAILURE

SYSTEM_SSH_AGENT_FAILURE

SYSTEM_SSH_AGENT_FORWARD_ACTIVE

SYSTEM_SSH_AGENT_FORWARD_ACTIVE

SYSTEM_SSH_AGENT_FORWARD_NONE

SYSTEM_SSH_AGENT_FORWARD_NONE

SYSTEM_SSH_AGENT_FORWARD_REQUEST

SYSTEM_SSH_AGENT_FORWARD_REQUEST

SYSTEM_SSH_AGENT_IDENTITIES_ANSWER

SYSTEM_SSH_AGENT_IDENTITIES_ANSWER

SYSTEM_SSH_AGENT_SIGN_RESPONSE

SYSTEM_SSH_AGENT_SIGN_RESPONSE

SYSTEM_SSH_AGENTC_REQUEST_IDENTITIES

SYSTEM_SSH_AGENTC_REQUEST_IDENTITIES

SYSTEM_SSH_AGENTC_SIGN_REQUEST

SYSTEM_SSH_AGENTC_SIGN_REQUEST

TMPLDIR

TMPLDIR

UFPDF_VERSION

UFPDF_VERSION

Functions

_()

_(  $msg) 

Parameters

$msg

__autoload()

__autoload(  $className) 

Loads class definition

Parameters

$className

_get_raw_schema()

_get_raw_schema(  $schema_to_fetch,   $dn = '') : \an

Fetches the raw schema array for the subschemaSubentry of the server. Note, this function has grown many hairs to accomodate 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".

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 paremeter 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)

Returns

\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_dn()

_get_schema_dn(string  $dn, boolean  $debug = false) : 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.

Parameters

string $dn

The DN (may be null) which houses the subschemaSubEntry attribute which

             this function can use to determine the schema entry's DN.
boolean $debug

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

Returns

string —

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

a_array_rand()

a_array_rand(  $input,   $num_req) : string

This function returns an array of $num_req values randomly picked from the $input array

Parameters

$input
$num_req

Returns

string —

The padded string

add_aliases_to_attrs()

add_aliases_to_attrs(  $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'.

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

Parameters

$attrs

add_hook()

add_hook(  $hook_name,   $hook_function,   $priority,   $rollback_function = null) 

Adds a procedure to a hook for later execution.

Parameters

$hook_name
$hook_function
$priority
$rollback_function

add_sup_to_attrs()

add_sup_to_attrs(  $attrs,   $attrs_oid) 

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

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

Parameters

$attrs
$attrs_oid

addSecurityTokenToMetaHTML()

addSecurityTokenToMetaHTML(\htmlTable|\htmlGroup  $container) 

Adds a hidden input field to the given meta HTML table.

Should be used to add token at the end of table.

Parameters

\htmlTable|\htmlGroup $container

table

addSecurityTokenToSession()

addSecurityTokenToSession() 

Adds a security token to the session to prevent CSRF attacks.

app_error_handler()

app_error_handler(  $errno,   $errstr,   $file,   $lineno) 

Custom error handling function.

When a PHP error occurs, PHP will call this function rather than printing the typical PHP error string. This provides the application the ability to format an error message so that it looks better. Optionally, it can present a link so that a user can search/submit bugs. This function is not to be called directly. It is exclusively for the use of PHP internally. If this function is called by PHP from within a context where error handling has been disabled (ie, from within a function called with "@" prepended), then this function does nothing.

Parameters

$errno
$errstr
$file
$lineno

app_name()

app_name() 

Returns the application name.

app_session_start()

app_session_start() : boolean

The only function which should be called by a user

Returns

boolean —

Returns true if the session was started the first time

app_version()

app_version() : string

Returns the application version currently running. The version is read from the file named VERSION.

Returns

string —

The current version as read from the VERSION file.

array_delete()

array_delete(array  $values, array  $array) : array

This function will return all values from $array without values of $values.

Parameters

array $values

list of values which should be removed

array $array

list of original values

Returns

array —

list of remaining values

array_stripslashes()

array_stripslashes(  $array) 

Strips all slashes from the specified array in place (pass by ref).

Parameters

$array

array_to_query_string()

array_to_query_string(  $array,   $exclude_vars = array()) : string

Converts an array to a query-string with the option to exclude certain variables from the returned query string. This is convenient if callers want to convert the current GET query string or POST array into a string and replace certain variables with their own.

Parameters

$array
$exclude_vars

Returns

string —

The string created from the array.

arrayLower()

arrayLower(array  $array) 

Reads an array and returns the array values back in lower case

Parameters

array $array

The array to convert the values to lowercase.

auto_lang()

auto_lang(  $lang) 

This function will convert the browser two character language into the default 5 character language, where the country portion should NOT be assumed to be upper case characters of the first two characters.

Parameters

$lang

base64EncodeForEMail()

base64EncodeForEMail(String  $value) : String

Returns a base64 encoded string of the given values in a fomat that is used in emails.

Parameters

String $value

value to encode

Returns

String —

base64 encoded value

binSIDtoText()

binSIDtoText(  $binsid) 

Parameters

$binsid

blowfish_decrypt()

blowfish_decrypt(  $encdata,   $secret = null) : string

Decryption using blowfish algorithm

Parameters

$encdata
$secret

Returns

string —

Original data

blowfish_encrypt()

blowfish_encrypt(  $data,   $secret = null) : string

Encryption using blowfish algorithm

Parameters

$data
$secret

Returns

string —

The encrypted result

boldText()

boldText(string  $text) : string

Replace {bold} and {endbold} with <b> and </b> HTML-Tags.

Parameters

string $text

The text that is used to search for {bold} and {endbold} tags.

Returns

string —

The submitted text with {bold} and {endbold} replaced with the appropriate HTML tages and

build_tree()

build_tree(  $server,   $dn,   $buildtree) 

Parameters

$server
$dn
$buildtree

buildUploadAccounts()

buildUploadAccounts(\LAM\TYPES\ConfiguredType  $type, array  $data, array  $ids, array  $selectedModules) : mixed

This function builds the LDAP accounts for the file upload.

If there are problems status messages will be printed automatically.

Parameters

\LAM\TYPES\ConfiguredType $type

account type

array $data

array containing one account in each element

array $ids

array( => )

array $selectedModules

selected account modules

Returns

mixed —

array including accounts or false if there were errors

cached_schema_available()

cached_schema_available(  $schema_type) 

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

Parameters

$schema_type

check_config()

check_config(  $config_file) 

Makes sure that the config file is properly setup.

Parameters

$config_file

check_ip()

check_ip(String  $ip, boolean  $subnet = false) 

Checks if the given IP is valid.

Parameters

String $ip

IP address

boolean $subnet

IP must be a subnet

check_module_conflicts()

check_module_conflicts(array  $selected, array  $deps) : boolean

Checks if there are conflicts between modules

Parameters

array $selected

selected module names

array $deps

module dependencies

Returns

boolean —

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

check_module_depends()

check_module_depends(array  $selected, array  $deps) : mixed

Checks if there are missing dependencies between modules.

Parameters

array $selected

selected module names

array $deps

module dependencies

Returns

mixed —

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

checkChmod()

checkChmod(  $right,   $target,   $chmod) : \true,

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

Parameters

$right

read,write or execute

$target

owner,group or other

$chmod

the chmod rights

Returns

\true, —

if the chmod $right for $target were set

checkClientIP()

checkClientIP() 

Checks if the client's IP address is on the list of allowed IPs.

The script is stopped if the host is not valid.

checkConfigOptions()

checkConfigOptions(array  $scopes, array  $options) : array

Checks if the configuration options are valid

Parameters

array $scopes

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

array $options

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

Returns

array —

list of error messages

checkIfDeleteEntriesIsAllowed()

checkIfDeleteEntriesIsAllowed(String  $scope) : boolean

Checks if it is allowed to delete LDAP entries of the given type.

Parameters

String $scope

account type (e.g. 'user')

Returns

boolean —

true, if entries may be deleted

checkIfNewEntriesAreAllowed()

checkIfNewEntriesAreAllowed(String  $scope) : boolean

Checks if it is allowed to create new LDAP entries of the given type.

This also checks if general write access is enabled.

Parameters

String $scope

account type (e.g. 'user')

Returns

boolean —

true, if new entries are allowed

checkIfPasswordChangeIsAllowed()

checkIfPasswordChangeIsAllowed() : boolean

Checks if passwords may be changed.

Returns

boolean —

true, if allowed

checkIfToolIsActive()

checkIfToolIsActive(String  $tool) 

Checks if the given tool is active.

Otherwise, an error message is logged and the execution is stopped (die()).

Parameters

String $tool

tool class name (e.g. toolFileUpload)

checkIfWriteAccessIsAllowed()

checkIfWriteAccessIsAllowed(String  $scope = null) : boolean

Checks if write access to LDAP is allowed.

Parameters

String $scope

account type (e.g. user)

Returns

boolean —

true, if allowed

checkInput()

checkInput() : array

Checks user input and saves the entered settings.

Returns

array —

list of errors

checkPasswordHash()

checkPasswordHash(  $type, \unknown_type  $hash, \unknown_type  $password) 

Checks if the given password mathes the crypto hash.

Parameters

$type
\unknown_type $hash

password hash value

\unknown_type $password

plain text password to check

checkPasswordStrength()

checkPasswordStrength(String  $password, String  $userName, array  $otherUserAttrs) : mixed

Checks if the password fulfills the password policies.

Parameters

String $password

password

String $userName

user name

array $otherUserAttrs

user's first/last name

Returns

mixed —

true if ok, string with error message if not valid

checkProfileOptions()

checkProfileOptions(string  $typeId, array  $options) : array

Checks if the profile options are valid

Parameters

string $typeId

account type (user, group, host)

array $options

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

Returns

array —

list of error messages

checkSchemaForModule()

checkSchemaForModule(String  $name, String  $scope, String  $typeId) : String

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

Parameters

String $name

module name

String $scope

type (user, group, ...)

String $typeId

type id

Returns

String —

error message or null

checkSelfServiceOptions()

checkSelfServiceOptions(string  $scope, string  $fields, array  $attributes, boolean  $passwordChangeOnly, array  $readOnlyFields) : array

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

Parameters

string $scope

account type

string $fields

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

array $attributes

LDAP attributes

boolean $passwordChangeOnly

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

array $readOnlyFields

list of read-only fields

Returns

array —

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

checkSelfServiceSettings()

checkSelfServiceSettings(string  $scope, array  $options, \selfServiceProfile  $profile) : array

Checks if the self service settings are valid

Parameters

string $scope

account type

array $options

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

\selfServiceProfile $profile

profile

Returns

array —

list of error messages

cleanLDAPResult()

cleanLDAPResult(array  $entries) 

Cleans the result of an LDAP search.

This will remove all 'count' entries and also all numeric array keys.

Parameters

array $entries

LDAP entries in format $entries[entry number][attribute name][attribute values]

clear_hooks()

clear_hooks(  $hook_name) 

Removes all procedures from a hook.

Parameters

$hook_name

cmd_control_pane()

cmd_control_pane(  $type) : array

Commands available in the control_panel of the page

Parameters

$type

Returns

array

colorText()

colorText(string  $text) : string

Replace {color=#[HEX-Value]} or {color=[HEX-Value]} and {endcolor} with <font color="#[HEX-Value]"> and </font> HTML-Tags.

Parameters

string $text

The text that is used to search for {color} and {endcolor} tags.

Returns

string —

Input string with HTML-formatted color tags

compareDN()

compareDN(string  $a, string  $b) : integer

Helper function to sort DNs.

Parameters

string $a

first argument to compare

string $b

second argument to compare

Returns

integer —

0 if equal, 1 if $a is greater, -1 if $b is greater

containsFiles()

containsFiles(String  $dir) 

Checks if the given directory contains files.

This is used to check if config files need to be migrated.

Parameters

String $dir

directory path

convertHex2bin()

convertHex2bin(string  $value) : \binary

Converts a HEX string to a binary value

Parameters

string $value

HEX string

Returns

\binary —

result binary

convertHexStringToCharCallback()

convertHexStringToCharCallback(array  $hex) : String

Converts a hex encoded string like \12 to the corresponding character.

Parameters

array $hex

preg_replace_callback: matching hex string array

Returns

String —

character

copy_dn()

copy_dn(  $serverSRC,   $serverDST,   $dnSRC,   $dnDST,   $remove) 

Parameters

$serverSRC
$serverDST
$dnSRC
$dnDST
$remove

createConfigProfile()

createConfigProfile(String  $name, String  $password, String  $template) : mixed

Creates a new server profile.

Parameters

String $name

profile name

String $password

profile password

String $template

name of template file

Returns

mixed —

Boolean TRUE if creation was ok, error message if not

createEMailHeaders()

createEMailHeaders(String  $from, boolean  $isHTML, String  $replyTo = null, String  $cc = null, String  $bcc = null) : String

Generates the email header text for the given parameters.

Parameters

String $from

FROM address

boolean $isHTML

mail is formatted as HTML or plain text

String $replyTo

reply-to address (optional)

String $cc

CC address

String $bcc

BCC address

Returns

String —

header lines

crypt_random_string()

crypt_random_string(integer  $length) : string

Generate a random string.

Although microoptimizations are generally discouraged as they impair readability this function is ripe with microoptimizations because this function has the potential of being called a huge number of times. eg. for RSA key generation.

Parameters

integer $length

Returns

string

debug_dump()

debug_dump(  $variable,   $die = false,   $onlydebugaddr = false) 

This function dumps the $variable for debugging purposes

Parameters

$variable
$die
$onlydebugaddr

debug_dump_backtrace()

debug_dump_backtrace(  $msg = 'Calling BackTrace',   $die = false) 

This function generates a backtrace

Parameters

$msg
$die

debug_log()

debug_log(  $msg,   $level,   $indent) 

Debug Logging

The global debug level is turned on in your configuration file by setting: $config->custom->debug['level'] = 255; together with atleast one output direction (currently file and syslog are supported). $config->custom->debug['file'] = '/tmp/app_debug.log'; $config->custom->debug['syslog'] = true;

The debug level is turned into binary, then if the message levels bit is on the message will be sent to the debug log. (Thus setting your debug level to 255, all bits on, will results in all messages being printed.)

The message level bits are defined here. 0( 1) = Entry/Return results from function calls. 1( 2) = Configuration Processing 2( 4) = Template Processing 3( 8) = Schema Processing 4( 16) = LDAP Server Communication 5( 32) = Tree Processing 7( 64) = Other non generic messages 8(128) = Page Processing 9(256) = Hooks Processing

Parameters

$msg
$level
$indent

debug_sysmsg()

debug_sysmsg(  $msg) 

Send a debug as a sys message

Parameters

$msg

del_cached_item()

del_cached_item(  $index,   $item,   $subitem = 'null') 

Deletes the cache for a specified $item for the specified $index

Parameters

$index
$item
$subitem

deleteConfigProfile()

deleteConfigProfile(String  $name) : String

Deletes the given server profile.

Parameters

String $name

profile name

Returns

String —

null if success or error message if failed

deleteDN()

deleteDN(string  $dn, boolean  $recursive) : array

Deletes a DN and all child entries.

Parameters

string $dn

DN to delete

boolean $recursive

recursive delete also child entries

Returns

array —

error messages

deobfuscateText()

deobfuscateText(String  $text) 

Simple function to deobfuscate strings.

Parameters

String $text

text to deobfuscate

display_pla_parse_error()

display_pla_parse_error(  $request) 

Parameters

$request

dn_escape()

dn_escape(  $dn) 

Parse a DN and escape any special characters

Parameters

$dn

dn_unescape()

dn_unescape(  $dn) 

Parse a DN and unescape any special characters

Parameters

$dn

doUploadPostActions()

doUploadPostActions(\LAM\TYPES\ConfiguredType  $type, array  $data, array  $ids, array  $failed, array  $selectedModules, array  $accounts) : array

This function executes one post upload action.

Parameters

\LAM\TYPES\ConfiguredType $type

account type

array $data

array containing one account in each element

array $ids

array( => )

array $failed

list of accounts which were not created successfully

array $selectedModules

list of selected account modules

array $accounts

list of LDAP entries

Returns

array —

current status
array (
'status' => 'finished' | 'inProgress'
'module' =>
'progress' => 0..100
'errors' => array ()
)

doUploadPreActions()

doUploadPreActions(\LAM\TYPES\ConfiguredType  $type, array  $selectedModules, array  $attributes) : array

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

Parameters

\LAM\TYPES\ConfiguredType $type

account type

array $selectedModules

list of selected account modules

array $attributes

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

Returns

array —

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

draw_chooser_link()

draw_chooser_link(  $form,   $element,   $include_choose_text = true,   $rdn = 'none') 

Draws an HTML browse button which, when clicked, pops up a DN chooser dialog.

Parameters

$form
$element
$include_choose_text
$rdn

draw_formatted_dn()

draw_formatted_dn(  $server,   $entry) 

Gets a DN string using the user-configured tree_display_format string to format it.

Parameters

$server
$entry

draw_jpeg_photo()

draw_jpeg_photo(  $server,   $dn,   $attr_name = 'jpegphoto',   $index,   $draw_delete_buttons = false,   $options = array()) 

Draw the jpegPhoto image(s) for an entry wrapped in HTML. Many options are available to specify how the images are to be displayed.

Usage Examples: draw_jpeg_photo(0,'cn=Bob,ou=People,dc=example,dc=com',"jpegPhoto",0,true,array('img_opts'=>"border: 1px; width: 150px")); draw_jpeg_photo(1,'cn=Fred,ou=People,dc=example,dc=com',null,1);

Parameters

$server
$dn
$attr_name
$index
$draw_delete_buttons
$options

encodeMailAddress()

encodeMailAddress(String  $address) : String

Encodes the email address for the header part of an email.

Parameters

String $address

email address

Returns

String —

encoded mail address

enforceUserIsLoggedIn()

enforceUserIsLoggedIn(boolean  $check2ndFactor = true) 

Checks if the user is logged in. Stops script execution if not.

Parameters

boolean $check2ndFactor

check if the 2nd factor was provided if required

error()

error(  $msg,   $type = 'note',   $redirect = null,   $fatal = false,   $backtrace = false) 

Display an error message in the system message panel of the page.

Parameters

$msg
$type
$redirect
$fatal
$backtrace

escapeDN()

escapeDN(String  $dn) : String

Escapes any special characters in an LDAP DN.

Parameters

String $dn

DN

Returns

String —

escaped DN

expand_dn_with_base()

expand_dn_with_base(  $base,   $sub_dn) : string|null

Appends a servers base to a "sub" dn or returns the base.

Parameters

$base
$sub_dn

Returns

string|null —

Returns null if both base is null and sub_dn is null or empty

extractConfigOptionsFromPOST()

extractConfigOptionsFromPOST(array  $confTypes) : array

Extracts config options from HTTP POST data.

Parameters

array $confTypes

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

Returns

array —

list of config options (name => array(values))

extractDNSuffix()

extractDNSuffix(String  $dn) : String

Extracts the DN suffix from a given DN.

E.g. ou=people,dc=test,dc=com will result in dc=test,dc=com.

Parameters

String $dn

DN

Returns

String —

DN suffix

extractRDNAttribute()

extractRDNAttribute(String  $dn) : String

Extracts the RDN attribute name from a given DN.

Parameters

String $dn

DN

Returns

String —

RDN attribute name

extractRDNValue()

extractRDNValue(String  $dn) : String

Extracts the RDN attribute value from a given DN.

Parameters

String $dn

DN

Returns

String —

RDN attribute value

formatLDAPTimestamp()

formatLDAPTimestamp(String  $time) : String

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

Parameters

String $time

LDAP time value

Returns

String —

formated time

formatSecondsToShortFormat()

formatSecondsToShortFormat(integer  $numSeconds) : String

Formats a number of seconds to a more human readable format with minutes, hours, etc.

E.g. 70 seconds will return 1m10s.

Parameters

integer $numSeconds

number of seconds

Returns

String —

formated number

full_str_pad()

full_str_pad(  $input,   $pad_length,   $pad_string = '',   $pad_type) : string

String padding

Parameters

$input
$pad_length
$pad_string
$pad_type

Returns

string —

The padded string

generatePassword()

generatePassword(String  $dn, array  $user, boolean  $alternateAddressAllowed, array<mixed,string>  $modules) : array

Sets a generated password and displays it or sends it via mail.

Parameters

String $dn

LDAP DN

array $user

LDAP attributes of user

boolean $alternateAddressAllowed

allow sending to alternate mail address

array<mixed,string> $modules

account modules

Returns

array —

list of arrays that can be used to create status messages

generateRandomPassword()

generateRandomPassword() : String

Generates a random password with 12 digits.

Returns

String —

password

generateSalt()

generateSalt(integer  $len) : String

Calculates a password salt of the given legth.

Parameters

integer $len

salt length

Returns

String —

the salt string

get_cached_item()

get_cached_item(  $index,   $item,   $subitem = 'null') : \Returns

Returns the cached array of LDAP resources.

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).

Parameters

$index
$item
$subitem

Returns

\Returns —

the cached attributed requested,

    or null if there is nothing cached..

get_cached_schema()

get_cached_schema(  $schema_type) 

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).

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

Parameters

$schema_type

get_custom_file()

get_custom_file(  $index,   $filename,   $path) : string

Get a customized file for a server We don't need any caching, because it's done by PHP

Parameters

$index
$filename
$path

Returns

string —

The customized filename, if exists, or the standard one

get_enc_type()

get_enc_type(  $user_password) : string

Detects password encryption type

Returns crypto string listed in braces. If it is 'crypt' password, returns crypto detected in password hash. Function should detect md5crypt, blowfish and extended DES crypt. If function fails to detect encryption type, it returns NULL.

Parameters

$user_password

Returns

string

get_href()

get_href(  $type,   $extra_info = '') : string

Fetches the URL for the specified item. This is a convenience function for fetching project HREFs (like bugs)

Parameters

$type
$extra_info

Returns

string —

The URL to the requested item.

get_icon()

get_icon(  $server_id,   $dn,   $object_classes = array()) : string

Given a DN and server ID, this function reads the DN's objectClasses and determines which icon best represents the entry. The results of this query are cached in a session variable so it is not run every time the tree browser changes, just when exposing new DNs that were not displayed previously. That means we can afford a little bit of inefficiency here in favor of coolness. :)

This function returns a string like "country.png". All icon files are assumed to be contained in the /images/ directory of phpLDAPadmin.

Developers are encouraged to add new icons to the images directory and modify this function as needed to suit their types of LDAP entries. If the modifications are general to an LDAP audience, the phpLDAPadmin team will gladly accept them as a patch.

Parameters

$server_id
$dn
$object_classes

Returns

string

get_ldap_filter()

get_ldap_filter(string  $typeId) : string

Returns the LDAP filter used by the account lists

Parameters

string $typeId

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

Returns

string —

LDAP filter

get_line_end_format()

get_line_end_format() : String

Helper function for fetching the line end format.

Returns

String —

'win', 'unix', or 'mac' based on the user's browser..

get_next_number()

get_next_number(  $base,   $attr,   $increment = false,   $filter = false,   $startmin = null) : integer

For LDAP servers with auto_number enabled, this function will get the next available number using the host's preferred mechanism (pool or search).

This is configured in config.php by server:

$servers->setValue('auto_number','enable',true|false);

The available mechanisms are: pool: The pool mechanism uses a user-configured entry in the LDAP server to store the last used "number". This mechanism simply fetches and increments and returns that value.

search: The search mechanism will search the LDAP server that has the attribute set. It will then find the smallest value and "fills in the gaps" by incrementing the smallest attribute until an unused value is found.

NOTE: Both mechanisms do NOT prevent race conditions or toe-stomping, so care must be taken when actually creating the entry to check that the number returned here has not been used in the mean time. Note that the two different mechanisms may (will!) return different values as they use different algorithms to arrive at their result. Do not be alarmed if (when!) this is the case.

See config.php.example for more notes on the two mechanisms.

Parameters

$base
$attr
$increment
$filter
$startmin

Returns

integer

get_preg()

get_preg(string  $argument, string  $regexp) : boolean

Checks if a given value matches the selected regular expression.

Parameters

string $argument

value to check

string $regexp

pattern name

Returns

boolean —

true if matches, otherwise false

get_rdn()

get_rdn(  $dn,   $include_attrs,   $decode = false) : string

Given a DN string, this returns the 'RDN' portion of the string.

For example. given 'cn=Manager,dc=example,dc=com', this function returns 'cn=Manager' (it is really the exact opposite of ds_ldap::getContainer()).

Parameters

$dn
$include_attrs
$decode

Returns

string —

The RDN

get_request()

get_request(  $attr,   $type = 'POST',   $die = false,   $default = null) : \The

Return the result of a form variable, with optional default

Parameters

$attr
$type
$die
$default

Returns

\The —

form GET/REQUEST/SESSION/POST variable value or its default

get_schema_attribute()

get_schema_attribute(  $attr_name, string  $dn = null,   $use_cache = true) : \AttributeType

Gets a single AttributeType object specified by name.

Parameters

$attr_name
string $dn

(optional) It is easier to fetch schema if a DN is provided

        which defines the subschemaSubEntry attribute (all entries should).
$use_cache

Returns

\AttributeType

The specified AttributeType object or false on error.

get_schema_attributes()

get_schema_attributes(string  $dn = null,   $use_cache = true) : array

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.

Parameters

string $dn

(optional) It is easier to fetch schema if a DN is provided

        which defines the subschemaSubEntry attribute (all entries should).
$use_cache

Returns

array —

An array of AttributeType objects.

get_schema_matching_rules()

get_schema_matching_rules(  $dn = null,   $use_cache = true) 

Returns an array of MatchingRule objects for the specified server.

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

Parameters

$dn
$use_cache

get_schema_objectclass()

get_schema_objectclass(string  $oclass_name, string  $dn = null,   $use_cache = true) : \ObjectClass

Gets a single ObjectClass object specified by name.

Parameters

string $oclass_name

The name of the objectClass to fetch.

string $dn

(optional) It is easier to fetch schema if a DN is provided

        which defines the subschemaSubEntry attribute (all entries should).
$use_cache

Returns

\ObjectClass

The specified ObjectClass object or false on error.

get_schema_objectclasses()

get_schema_objectclasses(string  $dn = null,   $use_cache = true) : array

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.

Parameters

string $dn

(optional) It is easier to fetch schema if a DN is provided

        which defines the subschemaSubEntry attribute (all entries should).
$use_cache

Returns

array —

An array of ObjectClass objects.

get_schema_syntaxes()

get_schema_syntaxes(  $dn = null,   $use_cache = true) 

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.

Parameters

$dn
$use_cache

get_user_agent_string()

get_user_agent_string() : string|false

Gets the USER_AGENT string from the $_SERVER array, all in lower case in an E_NOTICE safe manner.

Returns

string|false —

The user agent string as reported by the browser.

getAbstractDN()

getAbstractDN(String  $dn) : String

Transforms a DN into a more user friendly format.

E.g. "dc=company,dc=de" is transformed to "company > de".

Parameters

String $dn

DN

Returns

String —

transformed DN

getAvailableModules()

getAvailableModules(string  $scope, boolean  $mustSupportAdminInterface = false) : array

Returns an array with all available user module names

Parameters

string $scope

account type (user, group, host)

boolean $mustSupportAdminInterface

module must support LAM admin interface (default: false)

Returns

array —

list of possible modules

getAvailablePDFFields()

getAvailablePDFFields(string  $typeId) : array

Returns a list of available PDF entries.

Parameters

string $typeId

account type (user, group, host)

Returns

array —

PDF entries (field ID => field label)

getCallingURL()

getCallingURL() : String

Returns the URL under which the page was loaded.

This includes any GET parameters set.

Returns

String —

URL

getClientIPForLogging()

getClientIPForLogging() : String

Returns the client IP and comma separated proxy IPs if any (HTTP_X_FORWARDED_FOR, HTTP_X_REAL_IP).

Returns

String —

client IP (e.g. 10.10.10.10,11.11.11.11)

getConfigOptions()

getConfigOptions(array  $scopes) : array

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

Parameters

array $scopes

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

Returns

array —

configuration options

getConfigProfiles()

getConfigProfiles() : array

Returns an array of string with all available configuration profiles (without .conf)

Returns

array —

profile names

getConfigTemplates()

getConfigTemplates() : array

Returns an array of string with all available configuration templates (without .conf.sample)

Returns

array —

template names

getdays()

getdays() : \number

This function will return the days from 1.1.1970 until now.

Returns

\number —

of days

getDefaultLDAPErrorString()

getDefaultLDAPErrorString(\handle  $server) : String

Returns the default error message to display on the web page.

HTML special characters are already escaped.

Parameters

\handle $server

LDAP server handle

Returns

String —

error message

getExtendedLDAPErrorMessage()

getExtendedLDAPErrorMessage(\handle  $server) : String

Returns the extended LDAP error message if any.

Parameters

\handle $server

LDAP server handle

Returns

String —

error message

getFormattedTime()

getFormattedTime(\unknown  $format) 

Returns the current time in formatted form.

Parameters

\unknown $format

format to use (e.g. 'Y-m-d H:i:s')

getHelp()

getHelp(string  $module, string  $helpID, string  $scope = '') : array

Returns a help entry from an account module.

Parameters

string $module

module name

string $helpID

help identifier

string $scope

account type

Returns

array —

help entry

getLanguages()

getLanguages() : array

Returns a list of all supported languages.

Returns

array —

languages

getLastLDAPError()

getLastLDAPError() : array

Returns the parameters for a StatusMessage of the last LDAP search.

Returns

array —

parameters for StatusMessage or null if all was ok

getLDAPServerHandle()

getLDAPServerHandle() : \handle

Returns the LDAP server handle.

Returns

\handle —

LDAP handle

getLDAPSSLCertificate()

getLDAPSSLCertificate(String  $server, String  $port) : mixed

Connects to the LDAP server and extracts the certificates.

Parameters

String $server

server name

String $port

server port

Returns

mixed —

false on error and certificate if extracted successfully

getModuleAlias()

getModuleAlias(string  $name, string  $scope) : string

Returns the alias name of a module

Parameters

string $name

the module name

string $scope

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

Returns

string —

alias name

getModulesDependencies()

getModulesDependencies(string  $scope) : array

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

"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

string $scope

the account type (user, group, host)

Returns

array —

dependencies

getMustAttrs()

getMustAttrs(  $oclasses) 

Parameters

$oclasses

getProfileOptions()

getProfileOptions(string  $typeId) : array

Returns the elements for the profile page.

Parameters

string $typeId

account type (user, group, host)

Returns

array —

profile elements

getRandomNumber()

getRandomNumber() : integer

Returns a random number.

Returns

integer —

random number

getRDNAttributes()

getRDNAttributes(string  $typeId, array  $selectedModules = null) : array

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

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

Parameters

string $typeId

account type (user, group, host)

array $selectedModules

return only RDN attributes of these modules

Returns

array —

list of LDAP attributes

getRecursiveAttributesFromObjectClass()

getRecursiveAttributesFromObjectClass(\ObjectClass  $oClass) : array

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

Parameters

\ObjectClass $oClass

object class

Returns

array —

list of attribute names

getRequiredExtensions()

getRequiredExtensions() : array

Returns true if the module is a base module

Returns

array —

required extensions

getSecurityTokenName()

getSecurityTokenName() : String

Returns the name of the security token parameter.

Returns

String —

name

getSecurityTokenValue()

getSecurityTokenValue() : String

Returns the value of the security token parameter.

Returns

String —

value

getSelfServiceFieldSettings()

getSelfServiceFieldSettings(string  $scope) : array

Returns the field settings for the self service.

Parameters

string $scope

account type

Returns

array —

settings

getSelfServiceOptions()

getSelfServiceOptions(string  $scope, array  $fields, array  $attributes, boolean  $passwordChangeOnly, array  $readOnlyFields) : array

Returns meta HTML code for each self service field.

Parameters

string $scope

account type

array $fields

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

array $attributes

LDAP attributes (attribute names in lower case)

boolean $passwordChangeOnly

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

array $readOnlyFields

list of read-only fields

Returns

array —

meta HTML code (array( => htmlResponsiveRow))

getSelfServiceProfiles()

getSelfServiceProfiles() : array

Returns a list of all available self service profiles (without .conf)

Returns

array —

profile names (array( => array(, , ...)))

getSelfServiceSearchAttributes()

getSelfServiceSearchAttributes(string  $scope) : array

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

Parameters

string $scope

account type

Returns

array —

attributes

getSelfServiceSettings()

getSelfServiceSettings(string  $scope, \selfServiceProfile  $profile) : array

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

Parameters

string $scope

account type

\selfServiceProfile $profile

currently edited profile

Returns

array —

configuration options

getSupportedHashTypes()

getSupportedHashTypes() : array

Returns the list of supported hash types (e.g. SSHA).

Returns

array —

hash types

getTimeZone()

getTimeZone() : \DateTimeZone

Returns the configured time zone.

Returns

\DateTimeZone —

time zone

getTimeZoneOffsetHours()

getTimeZoneOffsetHours() : integer

Returns the offset in hours from configured time zone to GMT.

Returns

integer —

offset

getTools()

getTools() : array

Returns the tools which are available for LAM.

Returns

array —

list of LAMtool classes

getUploadColumns()

getUploadColumns(\LAM\TYPES\ConfiguredType  $type, array  $selectedModules) : array

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

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

\LAM\TYPES\ConfiguredType $type

account type

array $selectedModules

selected account modules

Returns

array —

column list

htmlid()

htmlid(  $sid,   $dn) : string

Returns a HTML id that can be used in the URL after the #.

Parameters

$sid
$dn

Returns

string

in_array_ignore_case()

in_array_ignore_case(String  $needle, array  $haystack) 

Checks if a string exists in an array, ignoring case.

Parameters

String $needle

search string

array $haystack

array

is_base_module()

is_base_module(string  $name, string  $scope) : boolean

Returns true if the module is a base module

Parameters

string $name

the module name

string $scope

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

Returns

boolean —

true if base module

is_browser()

is_browser(  $type) 

Determine the OS for the browser

Parameters

$type

is_dn_string()

is_dn_string(  $str) : boolean

Given a string, this function returns true if the string has the format of a DN (ie, looks like "cn=Foo,dc=example,dc=com"). Returns false otherwise.

The purpose of this function is so that developers can examine a string and know if it looks like a DN, and draw a hyperlink as needed.

(See unit_test.php for test cases)

Parameters

$str

Returns

boolean

is_mail_string()

is_mail_string(  $str) : boolean

Get whether a string looks like an email address (user@example.com).

Parameters

$str

Returns

boolean —

Returns true if the specified string looks like an email address or false otherwise.

is_url_string()

is_url_string(  $str) : boolean

Get whether a string looks like a web URL (http://www.example.com/)

Parameters

$str

Returns

boolean —

Returns true if the specified string looks like a web URL or false otherwise.

isAccountTypeHidden()

isAccountTypeHidden(String  $type) : boolean

Checks if the given account type is hidden.

Parameters

String $type

account type (e.g. user)

Returns

boolean —

is hidden

isAjaxEnabled()

isAjaxEnabled() 

Is PLA configured for AJAX display

isCompress()

isCompress() 

Is compression enabled for output

isLAMProVersion()

isLAMProVersion() : boolean

Returns if this is a LAM Pro installation.

Returns

boolean —

LAM Pro installation

isLoggedIn()

isLoggedIn() : boolean

Returns if the user is logged in.

Returns

boolean —

is logged in

isObfuscatedText()

isObfuscatedText(String  $text) : boolean

Checks if the given text is obfuscated.

Parameters

String $text

text to check

Returns

boolean —

obfuscated or not

isOldSambaPassword()

isOldSambaPassword(array  $attributes, String  $password) 

Checks if old Samba password was used.

Parameters

array $attributes

LDAP attributes

String $password

password

isOnScreenPasswordAllowed()

isOnScreenPasswordAllowed() : boolean

Returns if showing password on screen is allowed.

Returns

boolean —

allowed

isPasswordChangeByDefault()

isPasswordChangeByDefault() : boolean

Returns if the password should be changed on next login by deafult.

Returns

boolean —

change by default

isSelfService()

isSelfService() : boolean

Returns if script runs inside self service.

Returns

boolean —

is self service

isSelfServiceProfileWritable()

isSelfServiceProfileWritable(string  $name, string  $scope) : boolean

Checks if a service profile is writable.

Parameters

string $name

profile name

string $scope

account type

Returns

boolean —

true if file is writable

isSendMailByDefault()

isSendMailByDefault() : boolean

Returns if the random password should be sent via email by deafult.

Returns

boolean —

send mail by default

isShowOnScreenByDefault()

isShowOnScreenByDefault() : boolean

Returns if the random password should be displayed on screen by deafult.

Returns

boolean —

show on screen by default

isSpecificPasswordAllowed()

isSpecificPasswordAllowed() : boolean

Returns if setting a specific password is allowed.

Returns

boolean —

allowed

lamCompareDescriptiveOptions()

lamCompareDescriptiveOptions(array  $a, array  $b) : integer

Helper function to sort descriptive options in parseHTML().

It compares the second entries of two arrays.

Parameters

array $a

first array

array $b

second array

Returns

integer —

compare result

lamConnectSSH()

lamConnectSSH(String  $server) : object

Connects to the given SSH server.

Parameters

String $server

server name (e.g. localhost or localhost,1234)

Returns

object —

handle

lamdaemon()

lamdaemon(array  $command, string  $server) : array

Sends commands to lamdaemon script.

Parameters

array $command

command to execute

string $server

remote server

Returns

array —

Output of lamdaemon

lamDecrypt()

lamDecrypt(object  $data, string  $prefix = '') : string

Decrypts a string

Parameters

object $data

string to decrypt

string $prefix

prefix for cookie names

Returns

string —

decrypted string

lamEncrypt()

lamEncrypt(string  $data, string  $prefix = '') : object

Encrypts a string

Parameters

string $data

string to encrypt

string $prefix

prefix for cookie names

Returns

object —

encrypted string

lamEncryptionAlgo()

lamEncryptionAlgo() : string

Returns the encryption algorithm to use.

Returns

string —

algorithm name

lamLoginSSH()

lamLoginSSH(\handle  $handle) 

Performs a login to the provided SSH handle.

Parameters

\handle $handle

SSH handle

Throws

\Exception

login failed

lamRunLamdaemonTestSuite()

lamRunLamdaemonTestSuite(String  $serverName, String  $serverTitle, boolean  $testQuota, \htmlTable  $container) 

Runs all tests for a given server.

Parameters

String $serverName

server ID

String $serverTitle

server name

boolean $testQuota

true, if Quotas should be checked

\htmlTable $container

container for HTML output

lamTestLamdaemon()

lamTestLamdaemon(string  $command, boolean  $stopTest, \connection  $handle, string  $testText, \htmlTable  $container) : boolean

Runs a test case of lamdaemon.

Parameters

string $command

test command

boolean $stopTest

specifies if test should be run

\connection $handle

SSH connection

string $testText

describing text

\htmlTable $container

container for HTML output

Returns

boolean —

true, if errors occured

LAMVersion()

LAMVersion() : string

Returns the version number of this LAM installation.

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

Returns

string —

version number

ldap_error_msg()

ldap_error_msg(  $msg,   $errnum) 

Print an LDAP error message

Parameters

$msg
$errnum

ldapGetDN()

ldapGetDN(String  $dn, array  $attributes = array('dn'), \handle  $handle = null) : array

Returns the given DN.

Parameters

String $dn

DN

array $attributes

list of attributes to fetch

\handle $handle

LDAP handle (optional for admin interface pages)

Returns

array —

attributes or null if not found

linkText()

linkText(string  $text) : string

Replace {link=[Link-Target]} and {endlink} with <a href="[Link-Target]" target="_blank"> and </a> HTML-Tags.

Parameters

string $text

The text that is used to search for {link} and {endlink} tags.

Returns

string —

Input string with HTML-formatted link tags

littleEndian()

littleEndian(  $hex) 

Converts a little-endian hex-number to one, that 'hexdec' can convert

Parameters

$hex

lmPassword()

lmPassword(  $password) : string

Generates the LM hash of a password.

Parameters

$password

Returns

string —

password hash

loadSelfServiceProfile()

loadSelfServiceProfile(string  $name, string  $scope) : \selfServiceProfile

Loads all settings of a self service profile.

Parameters

string $name

profile name

string $scope

account type

Returns

\selfServiceProfile

true if file was readable

lock()

lock(String  $dn, String  $attributes) : array

Locks the given user.

Parameters

String $dn

DN

String $attributes

LDAP attributes

Returns

array —

list of arrays that can be used to create status messages

logNewMessage()

logNewMessage(string  $level, string  $message) 

Puts a new message in the log file.

Parameters

string $level

log level (LOG_DEBUG, LOG_NOTICE, LOG_WARNING, LOG_ERR)

string $message

log message

logoffAndBackToLoginPage()

logoffAndBackToLoginPage() 

Logs off the user and displays the login page.

masort()

masort(  $data,   $sortby,   $rev) : array

Sort a multi dimensional array.

Parameters

$data
$sortby
$rev

Returns

array —

Sorted multi demension array.

metaRefresh()

metaRefresh(string  $page) 

Prints a meta refresh page

Parameters

string $page

the URL of the target page

mhash()

mhash(  $hash_id,   $password_clear) 

Parameters

$hash_id
$password_clear