selfService.inc
Interfaces, Classes, Traits and Enums
- SelfServicePersistenceStrategy
- Interface for self service profile persistence.
- SelfServiceLoginHandler
- Login handler for self service
- SelfServicePersistence
- Manages reading and writing self service profiles.
- SelfServicePersistenceStrategyFileSystem
- Uses local file system for storing self service profiles.
- SelfServicePersistenceStrategyPdo
- Uses PDO for storing self service profiles.
- selfServiceProfile
- Includes all settings of a self service profile.
- SelfServiceLdapConnection
- LDAP connection for self service.
- SelfServiceUserPasswordLoginHandler
- Performs login with user and password.
- SelfServiceHttpAuthLoginHandler
- Performs login with HTTP authentication.
- SelfService2FaLoginHandler
- Performs login with pure 2FA.
Table of Contents
- isLAMProVersion() : bool
- Returns if this is a LAM Pro installation.
- getSelfServiceSearchAttributes() : array<string|int, mixed>
- Returns a list of possible search attributes for the self service.
- getSelfServiceFieldSettings() : array<string|int, mixed>
- Returns the field settings for the self service.
- getSelfServiceOptions() : array<string|int, mixed>
- Returns meta HTML code for each self service field.
- checkSelfServiceOptions() : array<string|int, mixed>
- Checks if all input values are correct and returns the LDAP commands which should be executed.
- getSelfServiceSettings() : array<string|int, mixed>
- Returns a hash array (module name => elements) of all module options for the configuration page.
- checkSelfServiceSettings() : array<string|int, mixed>
- Checks if the self service settings are valid
- isSelfService() : bool
- Returns if script runs inside self service.
- openSelfServiceLdapConnection() : handle
- Opens the LDAP connection and returns the handle. No bind is done.
- bindLdapUser() : bool
- Binds the LDAP connections with given user and password.
Functions
isLAMProVersion()
Returns if this is a LAM Pro installation.
isLAMProVersion() : bool
Return values
bool —LAM Pro installation
getSelfServiceSearchAttributes()
Returns a list of possible search attributes for the self service.
getSelfServiceSearchAttributes(string $scope) : array<string|int, mixed>
Parameters
- $scope : string
-
account type
Return values
array<string|int, mixed> —attributes
getSelfServiceFieldSettings()
Returns the field settings for the self service.
getSelfServiceFieldSettings(string $scope) : array<string|int, mixed>
Parameters
- $scope : string
-
account type
Return values
array<string|int, mixed> —settings
getSelfServiceOptions()
Returns meta HTML code for each self service field.
getSelfServiceOptions(string $scope, array<string|int, mixed> $fields, array<string|int, mixed> $attributes, bool $passwordChangeOnly, array<string|int, mixed> $readOnlyFields) : array<string|int, mixed>
Parameters
- $scope : string
-
account type
- $fields : array<string|int, mixed>
-
input fields (array(<moduleName> => array(
, , ...))) - $attributes : array<string|int, mixed>
-
LDAP attributes (attribute names in lower case)
- $passwordChangeOnly : bool
-
indicates that the user is only allowed to change his password and no LDAP content is readable
- $readOnlyFields : array<string|int, mixed>
-
list of read-only fields
Return values
array<string|int, mixed> —meta HTML code (array(<moduleName> => htmlResponsiveRow))
checkSelfServiceOptions()
Checks if all input values are correct and returns the LDAP commands which should be executed.
checkSelfServiceOptions(string $scope, string $fields, array<string|int, mixed> $attributes, bool $passwordChangeOnly, array<string|int, mixed> $readOnlyFields) : array<string|int, mixed>
Parameters
- $scope : string
-
account type
- $fields : string
-
input fields (array(<moduleName> => array(
, , ...))) - $attributes : array<string|int, mixed>
-
LDAP attributes
- $passwordChangeOnly : bool
-
indicates that the user is only allowed to change his password and no LDAP content is readable
- $readOnlyFields : array<string|int, mixed>
-
list of read-only fields
Return values
array<string|int, mixed> —messages and LDAP commands (array('messages' => [], 'add' => [], 'del' => [], 'mod' => []))
getSelfServiceSettings()
Returns a hash array (module name => elements) of all module options for the configuration page.
getSelfServiceSettings(string $scope, selfServiceProfile $profile) : array<string|int, mixed>
Parameters
- $scope : string
-
account type
- $profile : selfServiceProfile
-
currently edited profile
Return values
array<string|int, mixed> —configuration options
checkSelfServiceSettings()
Checks if the self service settings are valid
checkSelfServiceSettings(string $scope, array<string|int, mixed> &$options, selfServiceProfile &$profile) : array<string|int, mixed>
Parameters
- $scope : string
-
account type
- $options : array<string|int, mixed>
-
hash array containing all options (name => array(...))
- $profile : selfServiceProfile
-
profile
Return values
array<string|int, mixed> —list of error messages
isSelfService()
Returns if script runs inside self service.
isSelfService() : bool
Return values
bool —is self service
openSelfServiceLdapConnection()
Opens the LDAP connection and returns the handle. No bind is done.
openSelfServiceLdapConnection(selfServiceProfile $profile) : handle
Parameters
- $profile : selfServiceProfile
-
profile
Return values
handle —LDAP handle or null if connection failed
bindLdapUser()
Binds the LDAP connections with given user and password.
bindLdapUser(handle $handle, mixed $profile, string $userDn, string $password) : bool
Parameters
- $handle : handle
-
LDAP handle
- $profile : mixed
- $userDn : string
-
bind DN
- $password : string
-
bind password
Return values
bool —binding successful